Closed avylove closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.42%. Comparing base (
c28b53f
) to head (8c36af6
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Might have to look at this a little more. Getting this (Although only in the pull_request test run not the push test run. The references are wrong, but still points to something.
blessed/colorspace.py:1: [R0401(cyclic-import), ] Cyclic import (blessed.sequences -> blessed.terminal)
looks like it comes from the blessed/sequences.pyi file, importing blessed/terminal.py to use the Terminal type https://github.com/jquast/blessed/blob/c28b53fccab1c1966e06c31f58a44b9359838711/blessed/sequences.pyi#L6
I'm not sure what could be done, except to move all of sequences. into terminal. so that they are in the same file
I am ok with moving all of sequences into terminal, so long as there is some alias that allows from blessed.sequences import ..
statements to continue to work, there are several test cases covering this already.
@jquast, sorry for the delay. I went the route of using a guard if TYPE_CHECKING:
in the .pyi
files and quoting Terminal
in the type annotations. This seems to make Pylint happy without breaking anything else.
We could use from __future__ import annotations
to avoid using quotes, but this only works in 3.7+ so could cause issues with someone using 3.5 or 3.6 with typing.
Looks like there are some errors due to missing type annotations for the ESC_DELAY
changes. Not sure why that should matter, but looks like it does. I'll do a PR for that soon. Of course it doesn't fail locally, so not sure what's different in CI or why it didn't fail when this PR ran it's tests.
Pylint recently started checking .pyi files but there are some messages that either don't make sense (ex: unused argument) or aren't strictly necessary in a type hints file (ex: no function docstring).
There is some discussion in https://github.com/pylint-dev/pylint/issues/9096 of quieting these, but rather than wait, I figured we can fix the ones that made sense to fix and disable the others.