-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ci #202
Update ci #202
Changes from 8 commits
c18c701
3cf9d97
7711b92
afdea13
38d6281
dde4479
fe2124c
c124786
41539a0
6f0f574
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Entry file when executed with `python -m`.""" | ||
|
||
import sys | ||
|
||
from . import main | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
import ast | ||
from fnmatch import fnmatch | ||
from typing import TYPE_CHECKING, NamedTuple, TypeVar | ||
from typing import TYPE_CHECKING, NamedTuple, TypeVar, Union | ||
|
||
import libcst as cst | ||
import libcst.matchers as m | ||
|
@@ -29,7 +29,9 @@ | |
|
||
T = TypeVar("T", bound=Flake8TrioVisitor) | ||
T_CST = TypeVar("T_CST", bound=Flake8TrioVisitor_cst) | ||
T_EITHER = TypeVar("T_EITHER", bound=Flake8TrioVisitor | Flake8TrioVisitor_cst) | ||
T_EITHER = TypeVar( | ||
"T_EITHER", bound=Union[Flake8TrioVisitor, Flake8TrioVisitor_cst] | ||
) | ||
Comment on lines
+32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't previously specify There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. although I never remember which tools want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mypy wants you to run separate runs of all of them in parallel x) |
||
|
||
|
||
def error_class(error_class: type[T]) -> type[T]: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that ignore still firing? I assume so :/
Also, why isn't line 163 changed (or other cases that look exactly like this)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not! And turns out
reportUnnecessaryTypeIgnoreComment
doesn't default to true withstrict = true
, so time to turn that on.I did change this one hoping it would flow through and silence RUF012 ("Mutable class attribute should be annotated with
typing.ClassVar
") to the classes inheriting from it - but when that didn't happen I silenced the error rather than change it in the 25 other places. But maybe I'll bother doing the big search&replaceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh hm, the reason it wasn't enabled is because there's no separate setting for
pyright: ignore
vstype: ignore
(and unlikely to be added), and mypy doesn't havemypy: ignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could perhaps enable mypy's
type: ignore
, but that'd involve adding a bunch of deps to its pre-commit env and/or go through a bunch of them and replace withpyright: ignore
- and I don't think that's worth bothering with currently.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we annotate as
Mapping[str, str]
so that it's logically immutable maybe our typecheckers will be happier?