mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:44:56 +00:00
test: update snapshots with trimmed lines
This updates snapshots where long lines now get trimmed with `annotate-snippets`. And an ellipsis is inserted to indicate trimming. This is a little hokey to test since in tests we don't do any styling. And I believe this just uses the default "max term width" for rendering. But in real life, it seems like a big improvement to have long lines trimmed if they would otherwise wrap in the terminal. So this seems like an improvement to me. There are some other fixes here that overlap with previous categories.
This commit is contained in:
parent
84ba4ecaf5
commit
670fcecd1b
15 changed files with 343 additions and 359 deletions
|
@ -1,11 +1,10 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
PYI003.pyi:4:4: PYI003 Unrecognized `sys.version_info` check
|
PYI003.pyi:4:4: PYI003 Unrecognized `sys.version_info` check
|
||||||
|
|
|
|
||||||
3 | if sys.version_info[0] == 2: ...
|
3 | if sys.version_info[0] == 2: ...
|
||||||
4 | if sys.version_info[0] == True: ... # Y003 Unrecognized sys.version_info check # E712 comparison to True should be 'if cond is True:' or 'if cond:'
|
4 | if sys.version_info[0] == True: ... # Y003 Unrecognized sys.version_info check # E712 comparison to True should be 'if cond is True:'…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
|
||||||
5 | if sys.version_info[0.0] == 2: ... # Y003 Unrecognized sys.version_info check
|
5 | if sys.version_info[0.0] == 2: ... # Y003 Unrecognized sys.version_info check
|
||||||
6 | if sys.version_info[False] == 2: ... # Y003 Unrecognized sys.version_info check
|
6 | if sys.version_info[False] == 2: ... # Y003 Unrecognized sys.version_info check
|
||||||
|
@ -14,7 +13,7 @@ PYI003.pyi:4:4: PYI003 Unrecognized `sys.version_info` check
|
||||||
PYI003.pyi:5:4: PYI003 Unrecognized `sys.version_info` check
|
PYI003.pyi:5:4: PYI003 Unrecognized `sys.version_info` check
|
||||||
|
|
|
|
||||||
3 | if sys.version_info[0] == 2: ...
|
3 | if sys.version_info[0] == 2: ...
|
||||||
4 | if sys.version_info[0] == True: ... # Y003 Unrecognized sys.version_info check # E712 comparison to True should be 'if cond is True:' or 'if cond:'
|
4 | if sys.version_info[0] == True: ... # Y003 Unrecognized sys.version_info check # E712 comparison to True should be 'if cond is True:'…
|
||||||
5 | if sys.version_info[0.0] == 2: ... # Y003 Unrecognized sys.version_info check
|
5 | if sys.version_info[0.0] == 2: ... # Y003 Unrecognized sys.version_info check
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
|
||||||
6 | if sys.version_info[False] == 2: ... # Y003 Unrecognized sys.version_info check
|
6 | if sys.version_info[False] == 2: ... # Y003 Unrecognized sys.version_info check
|
||||||
|
@ -23,7 +22,7 @@ PYI003.pyi:5:4: PYI003 Unrecognized `sys.version_info` check
|
||||||
|
|
||||||
PYI003.pyi:6:4: PYI003 Unrecognized `sys.version_info` check
|
PYI003.pyi:6:4: PYI003 Unrecognized `sys.version_info` check
|
||||||
|
|
|
|
||||||
4 | if sys.version_info[0] == True: ... # Y003 Unrecognized sys.version_info check # E712 comparison to True should be 'if cond is True:' or 'if cond:'
|
4 | if sys.version_info[0] == True: ... # Y003 Unrecognized sys.version_info check # E712 comparison to True should be 'if cond is True:'…
|
||||||
5 | if sys.version_info[0.0] == 2: ... # Y003 Unrecognized sys.version_info check
|
5 | if sys.version_info[0.0] == 2: ... # Y003 Unrecognized sys.version_info check
|
||||||
6 | if sys.version_info[False] == 2: ... # Y003 Unrecognized sys.version_info check
|
6 | if sys.version_info[False] == 2: ... # Y003 Unrecognized sys.version_info check
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI003
|
||||||
|
|
|
@ -1,44 +1,43 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
PYI033.pyi:6:22: PYI033 Don't use type comments in stub file
|
PYI033.pyi:6:22: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
4 | from typing import TypeAlias
|
4 | … import TypeAlias
|
||||||
5 |
|
5 | …
|
||||||
6 | A: TypeAlias = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
6 | …s = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
7 | …s = None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: …
|
||||||
8 | C: TypeAlias = None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
8 | …s = None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:7:22: PYI033 Don't use type comments in stub file
|
PYI033.pyi:7:22: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
6 | A: TypeAlias = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
6 | …one # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
7 | …one # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
8 | C: TypeAlias = None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
8 | …one #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
9 | D: TypeAlias = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
9 | …one # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:8:22: PYI033 Don't use type comments in stub file
|
PYI033.pyi:8:22: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
6 | A: TypeAlias = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
6 | …s = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
7 | …s = None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x:…
|
||||||
8 | C: TypeAlias = None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
8 | …s = None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
9 | D: TypeAlias = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
9 | …s = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
10 | E: TypeAlias = None# type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
10 | …s = None# type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:9:22: PYI033 Don't use type comments in stub file
|
PYI033.pyi:9:22: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
7 | … None # type: str # And here's an extra comment about why it's that type # Y033 Do not use type comments in stubs (e.g. use "x: in…
|
||||||
8 | C: TypeAlias = None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
8 | … None #type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
9 | D: TypeAlias = None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
9 | … None # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
10 | E: TypeAlias = None# type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
10 | … None# type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
11 | F: TypeAlias = None#type:int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
11 | … None#type:int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:10:20: PYI033 Don't use type comments in stub file
|
PYI033.pyi:10:20: PYI033 Don't use type comments in stub file
|
||||||
|
@ -62,29 +61,29 @@ PYI033.pyi:11:20: PYI033 Don't use type comments in stub file
|
||||||
|
|
||||||
PYI033.pyi:14:12: PYI033 Don't use type comments in stub file
|
PYI033.pyi:14:12: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
13 | def func(
|
13 | …func(
|
||||||
14 | arg1, # type: dict[str, int] # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
14 | …arg1, # type: dict[str, int] # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
15 | arg2 # type: Sequence[bytes] # And here's some more info about this arg # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
15 | …arg2 # type: Sequence[bytes] # And here's some more info about this arg # Y033 Do not use type comments in stubs (e.g. use "x: int…
|
||||||
16 | ): ...
|
16 | …..
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:15:11: PYI033 Don't use type comments in stub file
|
PYI033.pyi:15:11: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
13 | def func(
|
13 | …unc(
|
||||||
14 | arg1, # type: dict[str, int] # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
14 | …rg1, # type: dict[str, int] # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
15 | arg2 # type: Sequence[bytes] # And here's some more info about this arg # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
15 | …rg2 # type: Sequence[bytes] # And here's some more info about this arg # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
16 | ): ...
|
16 | ….
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:19:29: PYI033 Don't use type comments in stub file
|
PYI033.pyi:19:29: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
|
||||||
18 | class Foo:
|
18 | …
|
||||||
19 | Attr: TypeAlias = None # type: set[str] # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
19 | … None # type: set[str] # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int")
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI033
|
||||||
20 |
|
20 | …
|
||||||
21 | G: TypeAlias = None # type: ignore
|
21 | …# type: ignore
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI033.pyi:29:22: PYI033 Don't use type comments in stub file
|
PYI033.pyi:29:22: PYI033 Don't use type comments in stub file
|
||||||
|
|
|
@ -7,7 +7,7 @@ PYI034.py:21:9: PYI034 [*] `__new__` methods in classes like `Bad` usually retur
|
||||||
20 | ): # Y040 Do not inherit from "object" explicitly, as it is redundant in Python 3
|
20 | ): # Y040 Do not inherit from "object" explicitly, as it is redundant in Python 3
|
||||||
21 | def __new__(cls, *args: Any, **kwargs: Any) -> Bad:
|
21 | def __new__(cls, *args: Any, **kwargs: Any) -> Bad:
|
||||||
| ^^^^^^^ PYI034
|
| ^^^^^^^ PYI034
|
||||||
22 | ... # Y034 "__new__" methods usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__new__", e.g. "def __new__(cls, *args: Any, **kwargs: Any) -> Self: ..."
|
22 | ... # Y034 "__new__" methods usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__new__", e.g.…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ PYI034.py:36:9: PYI034 [*] `__enter__` methods in classes like `Bad` usually ret
|
||||||
35 |
|
35 |
|
||||||
36 | def __enter__(self) -> Bad:
|
36 | def __enter__(self) -> Bad:
|
||||||
| ^^^^^^^^^ PYI034
|
| ^^^^^^^^^ PYI034
|
||||||
37 | ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__enter__", e.g. "def __enter__(self) -> Self: ..."
|
37 | ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -43,11 +43,11 @@ PYI034.py:36:9: PYI034 [*] `__enter__` methods in classes like `Bad` usually ret
|
||||||
|
|
||||||
PYI034.py:39:15: PYI034 [*] `__aenter__` methods in classes like `Bad` usually return `self` at runtime
|
PYI034.py:39:15: PYI034 [*] `__aenter__` methods in classes like `Bad` usually return `self` at runtime
|
||||||
|
|
|
|
||||||
37 | ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__enter__", e.g. "def __enter__(self) -> Self: ..."
|
37 | ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self…
|
||||||
38 |
|
38 |
|
||||||
39 | async def __aenter__(self) -> Bad:
|
39 | async def __aenter__(self) -> Bad:
|
||||||
| ^^^^^^^^^^ PYI034
|
| ^^^^^^^^^^ PYI034
|
||||||
40 | ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__aenter__", e.g. "async def __aenter__(self) -> Self: ..."
|
40 | ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Sel…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -63,11 +63,11 @@ PYI034.py:39:15: PYI034 [*] `__aenter__` methods in classes like `Bad` usually r
|
||||||
|
|
||||||
PYI034.py:42:9: PYI034 [*] `__iadd__` methods in classes like `Bad` usually return `self` at runtime
|
PYI034.py:42:9: PYI034 [*] `__iadd__` methods in classes like `Bad` usually return `self` at runtime
|
||||||
|
|
|
|
||||||
40 | ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__aenter__", e.g. "async def __aenter__(self) -> Self: ..."
|
40 | ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Sel…
|
||||||
41 |
|
41 |
|
||||||
42 | def __iadd__(self, other: Bad) -> Bad:
|
42 | def __iadd__(self, other: Bad) -> Bad:
|
||||||
| ^^^^^^^^ PYI034
|
| ^^^^^^^^ PYI034
|
||||||
43 | ... # Y034 "__iadd__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__iadd__", e.g. "def __iadd__(self, other: Bad) -> Self: ..."
|
43 | ... # Y034 "__iadd__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self"…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ PYI034.py:165:9: PYI034 [*] `__iter__` methods in classes like `BadIterator1` us
|
||||||
164 | class BadIterator1(Iterator[int]):
|
164 | class BadIterator1(Iterator[int]):
|
||||||
165 | def __iter__(self) -> Iterator[int]:
|
165 | def __iter__(self) -> Iterator[int]:
|
||||||
| ^^^^^^^^ PYI034
|
| ^^^^^^^^ PYI034
|
||||||
166 | ... # Y034 "__iter__" methods in classes like "BadIterator1" usually return "self" at runtime. Consider using "typing_extensions.Self" in "BadIterator1.__iter__", e.g. "def __iter__(self) -> Self: ..."
|
166 | ... # Y034 "__iter__" methods in classes like "BadIterator1" usually return "self" at runtime. Consider using "typing_extens…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ PYI034.py:172:9: PYI034 [*] `__iter__` methods in classes like `BadIterator2` us
|
||||||
171 | ): # Y022 Use "collections.abc.Iterator[T]" instead of "typing.Iterator[T]" (PEP 585 syntax)
|
171 | ): # Y022 Use "collections.abc.Iterator[T]" instead of "typing.Iterator[T]" (PEP 585 syntax)
|
||||||
172 | def __iter__(self) -> Iterator[int]:
|
172 | def __iter__(self) -> Iterator[int]:
|
||||||
| ^^^^^^^^ PYI034
|
| ^^^^^^^^ PYI034
|
||||||
173 | ... # Y034 "__iter__" methods in classes like "BadIterator2" usually return "self" at runtime. Consider using "typing_extensions.Self" in "BadIterator2.__iter__", e.g. "def __iter__(self) -> Self: ..."
|
173 | ... # Y034 "__iter__" methods in classes like "BadIterator2" usually return "self" at runtime. Consider using "typing_extens…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ PYI034.py:179:9: PYI034 [*] `__iter__` methods in classes like `BadIterator3` us
|
||||||
178 | ): # Y022 Use "collections.abc.Iterator[T]" instead of "typing.Iterator[T]" (PEP 585 syntax)
|
178 | ): # Y022 Use "collections.abc.Iterator[T]" instead of "typing.Iterator[T]" (PEP 585 syntax)
|
||||||
179 | def __iter__(self) -> collections.abc.Iterator[int]:
|
179 | def __iter__(self) -> collections.abc.Iterator[int]:
|
||||||
| ^^^^^^^^ PYI034
|
| ^^^^^^^^ PYI034
|
||||||
180 | ... # Y034 "__iter__" methods in classes like "BadIterator3" usually return "self" at runtime. Consider using "typing_extensions.Self" in "BadIterator3.__iter__", e.g. "def __iter__(self) -> Self: ..."
|
180 | ... # Y034 "__iter__" methods in classes like "BadIterator3" usually return "self" at runtime. Consider using "typing_extens…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ PYI034.py:185:9: PYI034 [*] `__iter__` methods in classes like `BadIterator4` us
|
||||||
184 | # Note: *Iterable*, not *Iterator*, returned!
|
184 | # Note: *Iterable*, not *Iterator*, returned!
|
||||||
185 | def __iter__(self) -> Iterable[int]:
|
185 | def __iter__(self) -> Iterable[int]:
|
||||||
| ^^^^^^^^ PYI034
|
| ^^^^^^^^ PYI034
|
||||||
186 | ... # Y034 "__iter__" methods in classes like "BadIterator4" usually return "self" at runtime. Consider using "typing_extensions.Self" in "BadIterator4.__iter__", e.g. "def __iter__(self) -> Self: ..."
|
186 | ... # Y034 "__iter__" methods in classes like "BadIterator4" usually return "self" at runtime. Consider using "typing_extens…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ PYI034.py:195:9: PYI034 [*] `__aiter__` methods in classes like `BadAsyncIterato
|
||||||
194 | class BadAsyncIterator(collections.abc.AsyncIterator[str]):
|
194 | class BadAsyncIterator(collections.abc.AsyncIterator[str]):
|
||||||
195 | def __aiter__(self) -> typing.AsyncIterator[str]:
|
195 | def __aiter__(self) -> typing.AsyncIterator[str]:
|
||||||
| ^^^^^^^^^ PYI034
|
| ^^^^^^^^^ PYI034
|
||||||
196 | ... # Y034 "__aiter__" methods in classes like "BadAsyncIterator" usually return "self" at runtime. Consider using "typing_extensions.Self" in "BadAsyncIterator.__aiter__", e.g. "def __aiter__(self) -> Self: ..." # Y022 Use "collections.abc.AsyncIterator[T]" instead of "typing.AsyncIterator[T]" (PEP 585 syntax)
|
196 | ... # Y034 "__aiter__" methods in classes like "BadAsyncIterator" usually return "self" at runtime. Consider using "typing_e…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ PYI034.pyi:20:9: PYI034 [*] `__new__` methods in classes like `Bad` usually retu
|
||||||
20 | def __new__(
|
20 | def __new__(
|
||||||
| ^^^^^^^ PYI034
|
| ^^^^^^^ PYI034
|
||||||
21 | cls, *args: Any, **kwargs: Any
|
21 | cls, *args: Any, **kwargs: Any
|
||||||
22 | ) -> Bad: ... # Y034 "__new__" methods usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__new__", e.g. "def __new__(cls, *args: Any, **kwargs: Any) -> Self: ..."
|
22 | ) -> Bad: ... # Y034 "__new__" methods usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__new__"…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ PYI034.pyi:35:9: PYI034 [*] `__enter__` methods in classes like `Bad` usually re
|
||||||
35 | def __enter__(
|
35 | def __enter__(
|
||||||
| ^^^^^^^^^ PYI034
|
| ^^^^^^^^^ PYI034
|
||||||
36 | self,
|
36 | self,
|
||||||
37 | ) -> Bad: ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__enter__", e.g. "def __enter__(self) -> Self: ..."
|
37 | ) -> Bad: ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extension…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ PYI034.pyi:35:9: PYI034 [*] `__enter__` methods in classes like `Bad` usually re
|
||||||
PYI034.pyi:38:15: PYI034 [*] `__aenter__` methods in classes like `Bad` usually return `self` at runtime
|
PYI034.pyi:38:15: PYI034 [*] `__aenter__` methods in classes like `Bad` usually return `self` at runtime
|
||||||
|
|
|
|
||||||
36 | self,
|
36 | self,
|
||||||
37 | ) -> Bad: ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__enter__", e.g. "def __enter__(self) -> Self: ..."
|
37 | ) -> Bad: ... # Y034 "__enter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extension…
|
||||||
38 | async def __aenter__(
|
38 | async def __aenter__(
|
||||||
| ^^^^^^^^^^ PYI034
|
| ^^^^^^^^^^ PYI034
|
||||||
39 | self,
|
39 | self,
|
||||||
40 | ) -> Bad: ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__aenter__", e.g. "async def __aenter__(self) -> Self: ..."
|
40 | ) -> Bad: ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensio…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
@ -67,11 +67,11 @@ PYI034.pyi:38:15: PYI034 [*] `__aenter__` methods in classes like `Bad` usually
|
||||||
PYI034.pyi:41:9: PYI034 [*] `__iadd__` methods in classes like `Bad` usually return `self` at runtime
|
PYI034.pyi:41:9: PYI034 [*] `__iadd__` methods in classes like `Bad` usually return `self` at runtime
|
||||||
|
|
|
|
||||||
39 | self,
|
39 | self,
|
||||||
40 | ) -> Bad: ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__aenter__", e.g. "async def __aenter__(self) -> Self: ..."
|
40 | ) -> Bad: ... # Y034 "__aenter__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensio…
|
||||||
41 | def __iadd__(
|
41 | def __iadd__(
|
||||||
| ^^^^^^^^ PYI034
|
| ^^^^^^^^ PYI034
|
||||||
42 | self, other: Bad
|
42 | self, other: Bad
|
||||||
43 | ) -> Bad: ... # Y034 "__iadd__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions.Self" in "Bad.__iadd__", e.g. "def __iadd__(self, other: Bad) -> Self: ..."
|
43 | ) -> Bad: ... # Y034 "__iadd__" methods in classes like "Bad" usually return "self" at runtime. Consider using "typing_extensions…
|
||||||
|
|
|
|
||||||
= help: Use `Self` as return type
|
= help: Use `Self` as return type
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
PYI036.py:54:31: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
PYI036.py:54:31: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
||||||
|
|
|
|
||||||
|
@ -52,16 +51,16 @@ PYI036.py:59:48: PYI036 All keyword-only arguments in `__aexit__` must have a de
|
||||||
PYI036.py:62:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
PYI036.py:62:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
||||||
|
|
|
|
||||||
61 | class BadThree:
|
61 | class BadThree:
|
||||||
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg has bad annotation
|
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg…
|
||||||
| ^^^^^^^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^^^^^^^ PYI036
|
||||||
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI036: Second arg has bad annotation
|
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI0…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.py:63:73: PYI036 The second argument in `__aexit__` should be annotated with `object` or `BaseException | None`
|
PYI036.py:63:73: PYI036 The second argument in `__aexit__` should be annotated with `object` or `BaseException | None`
|
||||||
|
|
|
|
||||||
61 | class BadThree:
|
61 | class BadThree:
|
||||||
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg has bad annotation
|
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg…
|
||||||
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI036: Second arg has bad annotation
|
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI0…
|
||||||
| ^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^ PYI036
|
||||||
64 |
|
64 |
|
||||||
65 | class BadFour:
|
65 | class BadFour:
|
||||||
|
@ -70,8 +69,8 @@ PYI036.py:63:73: PYI036 The second argument in `__aexit__` should be annotated w
|
||||||
PYI036.py:63:94: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
PYI036.py:63:94: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
||||||
|
|
|
|
||||||
61 | class BadThree:
|
61 | class BadThree:
|
||||||
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg has bad annotation
|
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg…
|
||||||
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI036: Second arg has bad annotation
|
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI0…
|
||||||
| ^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^ PYI036
|
||||||
64 |
|
64 |
|
||||||
65 | class BadFour:
|
65 | class BadFour:
|
||||||
|
@ -79,20 +78,20 @@ PYI036.py:63:94: PYI036 The third argument in `__aexit__` should be annotated wi
|
||||||
|
|
||||||
PYI036.py:66:111: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None`
|
PYI036.py:66:111: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None`
|
||||||
|
|
|
|
||||||
65 | class BadFour:
|
65 | …
|
||||||
66 | def __exit__(self, typ: typing.Optional[type[BaseException]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
66 | …xception]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
||||||
| ^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^ PYI036
|
||||||
67 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad annotation
|
67 | …n] | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.py:67:101: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
PYI036.py:67:101: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
||||||
|
|
|
|
||||||
65 | class BadFour:
|
65 | …
|
||||||
66 | def __exit__(self, typ: typing.Optional[type[BaseException]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
66 | …eption]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
||||||
67 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad annotation
|
67 | … | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad a…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI036
|
||||||
68 |
|
68 | …
|
||||||
69 | class BadFive:
|
69 | …
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.py:70:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
PYI036.py:70:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
||||||
|
@ -100,7 +99,7 @@ PYI036.py:70:29: PYI036 The first argument in `__exit__` should be annotated wit
|
||||||
69 | class BadFive:
|
69 | class BadFive:
|
||||||
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^^^^^^^^ PYI036
|
||||||
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotation
|
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotati…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.py:70:58: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
PYI036.py:70:58: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
||||||
|
@ -108,7 +107,7 @@ PYI036.py:70:58: PYI036 [*] Star-args in `__exit__` should be annotated with `ob
|
||||||
69 | class BadFive:
|
69 | class BadFive:
|
||||||
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
||||||
| ^^^^^^^^^ PYI036
|
| ^^^^^^^^^ PYI036
|
||||||
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotation
|
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotati…
|
||||||
|
|
|
|
||||||
= help: Annotate star-args with `object`
|
= help: Annotate star-args with `object`
|
||||||
|
|
||||||
|
@ -126,7 +125,7 @@ PYI036.py:71:74: PYI036 [*] Star-args in `__aexit__` should be annotated with `o
|
||||||
|
|
|
|
||||||
69 | class BadFive:
|
69 | class BadFive:
|
||||||
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
||||||
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotation
|
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotati…
|
||||||
| ^^^ PYI036
|
| ^^^ PYI036
|
||||||
72 |
|
72 |
|
||||||
73 | class BadSix:
|
73 | class BadSix:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
PYI036.pyi:54:31: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
PYI036.pyi:54:31: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
||||||
|
|
|
|
||||||
|
@ -62,16 +61,16 @@ PYI036.pyi:59:66: PYI036 All keyword-only arguments in `__aexit__` must have a d
|
||||||
PYI036.pyi:62:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
PYI036.pyi:62:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
||||||
|
|
|
|
||||||
61 | class BadThree:
|
61 | class BadThree:
|
||||||
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg has bad annotation
|
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg…
|
||||||
| ^^^^^^^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^^^^^^^ PYI036
|
||||||
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI036: Second arg has bad annotation
|
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI0…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.pyi:63:73: PYI036 The second argument in `__aexit__` should be annotated with `object` or `BaseException | None`
|
PYI036.pyi:63:73: PYI036 The second argument in `__aexit__` should be annotated with `object` or `BaseException | None`
|
||||||
|
|
|
|
||||||
61 | class BadThree:
|
61 | class BadThree:
|
||||||
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg has bad annotation
|
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg…
|
||||||
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI036: Second arg has bad annotation
|
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI0…
|
||||||
| ^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^ PYI036
|
||||||
64 |
|
64 |
|
||||||
65 | class BadFour:
|
65 | class BadFour:
|
||||||
|
@ -80,8 +79,8 @@ PYI036.pyi:63:73: PYI036 The second argument in `__aexit__` should be annotated
|
||||||
PYI036.pyi:63:94: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
PYI036.pyi:63:94: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
||||||
|
|
|
|
||||||
61 | class BadThree:
|
61 | class BadThree:
|
||||||
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg has bad annotation
|
62 | def __exit__(self, typ: type[BaseException], exc: BaseException | None, tb: TracebackType | None) -> None: ... # PYI036: First arg…
|
||||||
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI036: Second arg has bad annotation
|
63 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException, __tb: TracebackType) -> bool | None: ... # PYI0…
|
||||||
| ^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^ PYI036
|
||||||
64 |
|
64 |
|
||||||
65 | class BadFour:
|
65 | class BadFour:
|
||||||
|
@ -89,20 +88,20 @@ PYI036.pyi:63:94: PYI036 The third argument in `__aexit__` should be annotated w
|
||||||
|
|
||||||
PYI036.pyi:66:111: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None`
|
PYI036.pyi:66:111: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None`
|
||||||
|
|
|
|
||||||
65 | class BadFour:
|
65 | …
|
||||||
66 | def __exit__(self, typ: typing.Optional[type[BaseException]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
66 | …xception]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
||||||
| ^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^ PYI036
|
||||||
67 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad annotation
|
67 | …n] | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.pyi:67:101: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
PYI036.pyi:67:101: PYI036 The third argument in `__aexit__` should be annotated with `object` or `types.TracebackType | None`
|
||||||
|
|
|
|
||||||
65 | class BadFour:
|
65 | …
|
||||||
66 | def __exit__(self, typ: typing.Optional[type[BaseException]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
66 | …eption]], exc: typing.Union[BaseException, None], tb: TracebackType) -> None: ... # PYI036: Third arg has bad annotation
|
||||||
67 | async def __aexit__(self, __typ: type[BaseException] | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad annotation
|
67 | … | None, __exc: BaseException | None, __tb: typing.Union[TracebackType, None, int]) -> bool | None: ... # PYI036: Third arg has bad a…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI036
|
||||||
68 |
|
68 | …
|
||||||
69 | class BadFive:
|
69 | …
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.pyi:70:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
PYI036.pyi:70:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
|
||||||
|
@ -110,7 +109,7 @@ PYI036.pyi:70:29: PYI036 The first argument in `__exit__` should be annotated wi
|
||||||
69 | class BadFive:
|
69 | class BadFive:
|
||||||
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ PYI036
|
| ^^^^^^^^^^^^^^^^^^^^ PYI036
|
||||||
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotation
|
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotati…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI036.pyi:70:58: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
PYI036.pyi:70:58: PYI036 [*] Star-args in `__exit__` should be annotated with `object`
|
||||||
|
@ -118,7 +117,7 @@ PYI036.pyi:70:58: PYI036 [*] Star-args in `__exit__` should be annotated with `o
|
||||||
69 | class BadFive:
|
69 | class BadFive:
|
||||||
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
||||||
| ^^^^^^^^^ PYI036
|
| ^^^^^^^^^ PYI036
|
||||||
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotation
|
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotati…
|
||||||
|
|
|
|
||||||
= help: Annotate star-args with `object`
|
= help: Annotate star-args with `object`
|
||||||
|
|
||||||
|
@ -136,7 +135,7 @@ PYI036.pyi:71:74: PYI036 [*] Star-args in `__aexit__` should be annotated with `
|
||||||
|
|
|
|
||||||
69 | class BadFive:
|
69 | class BadFive:
|
||||||
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
70 | def __exit__(self, typ: BaseException | None, *args: list[str]) -> bool: ... # PYI036: Bad star-args annotation
|
||||||
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotation
|
71 | async def __aexit__(self, /, typ: type[BaseException] | None, *args: Any) -> Awaitable[None]: ... # PYI036: Bad star-args annotati…
|
||||||
| ^^^ PYI036
|
| ^^^ PYI036
|
||||||
72 |
|
72 |
|
||||||
73 | class BadSix:
|
73 | class BadSix:
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
PYI052.pyi:14:10: PYI052 Need type annotation for `field5`
|
PYI052.pyi:14:10: PYI052 Need type annotation for `field5`
|
||||||
|
|
|
|
||||||
12 | field43: int = -0xFFFFFFFF
|
12 | field43: int = -0xFFFFFFFF
|
||||||
13 | field44: int = -1234567890
|
13 | field44: int = -1234567890
|
||||||
14 | field5 = 0 # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int") # Y052 Need type annotation for "field5"
|
14 | field5 = 0 # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int") # Y052 Need ty…
|
||||||
| ^ PYI052
|
| ^ PYI052
|
||||||
15 | field6 = 0 # Y052 Need type annotation for "field6"
|
15 | field6 = 0 # Y052 Need type annotation for "field6"
|
||||||
16 | field7 = b"" # Y052 Need type annotation for "field7"
|
16 | field7 = b"" # Y052 Need type annotation for "field7"
|
||||||
|
@ -15,7 +14,7 @@ PYI052.pyi:14:10: PYI052 Need type annotation for `field5`
|
||||||
PYI052.pyi:15:10: PYI052 Need type annotation for `field6`
|
PYI052.pyi:15:10: PYI052 Need type annotation for `field6`
|
||||||
|
|
|
|
||||||
13 | field44: int = -1234567890
|
13 | field44: int = -1234567890
|
||||||
14 | field5 = 0 # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int") # Y052 Need type annotation for "field5"
|
14 | field5 = 0 # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int") # Y052 Need ty…
|
||||||
15 | field6 = 0 # Y052 Need type annotation for "field6"
|
15 | field6 = 0 # Y052 Need type annotation for "field6"
|
||||||
| ^ PYI052
|
| ^ PYI052
|
||||||
16 | field7 = b"" # Y052 Need type annotation for "field7"
|
16 | field7 = b"" # Y052 Need type annotation for "field7"
|
||||||
|
@ -24,7 +23,7 @@ PYI052.pyi:15:10: PYI052 Need type annotation for `field6`
|
||||||
|
|
||||||
PYI052.pyi:16:10: PYI052 Need type annotation for `field7`
|
PYI052.pyi:16:10: PYI052 Need type annotation for `field7`
|
||||||
|
|
|
|
||||||
14 | field5 = 0 # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int") # Y052 Need type annotation for "field5"
|
14 | field5 = 0 # type: int # Y033 Do not use type comments in stubs (e.g. use "x: int" instead of "x = ... # type: int") # Y052 Need ty…
|
||||||
15 | field6 = 0 # Y052 Need type annotation for "field6"
|
15 | field6 = 0 # Y052 Need type annotation for "field6"
|
||||||
16 | field7 = b"" # Y052 Need type annotation for "field7"
|
16 | field7 = b"" # Y052 Need type annotation for "field7"
|
||||||
| ^^^ PYI052
|
| ^^^ PYI052
|
||||||
|
|
|
@ -6,7 +6,7 @@ PYI066.pyi:3:4: PYI066 Put branches for newer Python versions first when branchi
|
||||||
|
|
|
|
||||||
1 | import sys
|
1 | import sys
|
||||||
2 |
|
2 |
|
||||||
3 | if sys.version_info < (3, 10): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 10)"
|
3 | if sys.version_info < (3, 10): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if s…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
||||||
4 | def foo(x): ...
|
4 | def foo(x): ...
|
||||||
5 | else:
|
5 | else:
|
||||||
|
@ -16,27 +16,27 @@ PYI066.pyi:8:4: PYI066 Put branches for newer Python versions first when branchi
|
||||||
|
|
|
|
||||||
6 | def foo(x, *, bar=True): ...
|
6 | def foo(x, *, bar=True): ...
|
||||||
7 |
|
7 |
|
||||||
8 | if sys.version_info < (3, 8): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 8)"
|
8 | if sys.version_info < (3, 8): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if s…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
||||||
9 | def bar(x): ...
|
9 | def bar(x): ...
|
||||||
10 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 9)"
|
10 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI066.pyi:10:6: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons
|
PYI066.pyi:10:6: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons
|
||||||
|
|
|
|
||||||
8 | if sys.version_info < (3, 8): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 8)"
|
8 | if sys.version_info < (3, 8): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if s…
|
||||||
9 | def bar(x): ...
|
9 | def bar(x): ...
|
||||||
10 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 9)"
|
10 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
||||||
11 | def bar(x, *, bar=True): ...
|
11 | def bar(x, *, bar=True): ...
|
||||||
12 | elif sys.version_info < (3, 11): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 10)"
|
12 | elif sys.version_info < (3, 11): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "i…
|
||||||
|
|
|
|
||||||
|
|
||||||
PYI066.pyi:12:6: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons
|
PYI066.pyi:12:6: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons
|
||||||
|
|
|
|
||||||
10 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 9)"
|
10 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if…
|
||||||
11 | def bar(x, *, bar=True): ...
|
11 | def bar(x, *, bar=True): ...
|
||||||
12 | elif sys.version_info < (3, 11): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 10)"
|
12 | elif sys.version_info < (3, 11): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "i…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
||||||
13 | def bar(x, *, bar=True, baz=False): ...
|
13 | def bar(x, *, bar=True, baz=False): ...
|
||||||
14 | else:
|
14 | else:
|
||||||
|
@ -46,7 +46,7 @@ PYI066.pyi:20:6: PYI066 Put branches for newer Python versions first when branch
|
||||||
|
|
|
|
||||||
18 | if sys.version_info >= (3, 5):
|
18 | if sys.version_info >= (3, 5):
|
||||||
19 | ...
|
19 | ...
|
||||||
20 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if sys.version_info >= (3, 10)"
|
20 | elif sys.version_info < (3, 9): # Y066 When using if/else with sys.version_info, put the code for new Python versions first, e.g. "if…
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI066
|
||||||
21 | ...
|
21 | ...
|
||||||
22 | else:
|
22 | else:
|
||||||
|
|
|
@ -66,7 +66,7 @@ quote3.py:22:44: TC002 [*] Move third-party import `django.contrib.auth.models.A
|
||||||
22 | from django.contrib.auth.models import AbstractBaseUser
|
22 | from django.contrib.auth.models import AbstractBaseUser
|
||||||
| ^^^^^^^^^^^^^^^^ TC002
|
| ^^^^^^^^^^^^^^^^ TC002
|
||||||
23 |
|
23 |
|
||||||
24 | def test_callable_annotated_literal(callable_fn: AbstractBaseUser[Callable[[int, Annotated[str, Literal['active', "inactive"]]], bool]]):
|
24 | def test_callable_annotated_literal(callable_fn: AbstractBaseUser[Callable[[int, Annotated[str, Literal['active', "inactive"]]], b…
|
||||||
|
|
|
|
||||||
= help: Move into type-checking block
|
= help: Move into type-checking block
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
E23.py:2:7: E231 [*] Missing whitespace after ','
|
E23.py:2:7: E231 [*] Missing whitespace after ','
|
||||||
|
|
|
|
||||||
|
@ -793,7 +792,7 @@ E23.py:125:32: E231 [*] Missing whitespace after ':'
|
||||||
124 |
|
124 |
|
||||||
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
||||||
| ^ E231
|
| ^ E231
|
||||||
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_dynamic[x::-1]):
|
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_d…
|
||||||
127 | pass
|
127 | pass
|
||||||
|
|
|
|
||||||
= help: Add missing whitespace
|
= help: Add missing whitespace
|
||||||
|
@ -814,7 +813,7 @@ E23.py:125:54: E231 [*] Missing whitespace after ':'
|
||||||
124 |
|
124 |
|
||||||
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
||||||
| ^ E231
|
| ^ E231
|
||||||
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_dynamic[x::-1]):
|
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_d…
|
||||||
127 | pass
|
127 | pass
|
||||||
|
|
|
|
||||||
= help: Add missing whitespace
|
= help: Add missing whitespace
|
||||||
|
@ -835,7 +834,7 @@ E23.py:125:84: E231 [*] Missing whitespace after ':'
|
||||||
124 |
|
124 |
|
||||||
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
||||||
| ^ E231
|
| ^ E231
|
||||||
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_dynamic[x::-1]):
|
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_d…
|
||||||
127 | pass
|
127 | pass
|
||||||
|
|
|
|
||||||
= help: Add missing whitespace
|
= help: Add missing whitespace
|
||||||
|
@ -853,7 +852,7 @@ E23.py:125:84: E231 [*] Missing whitespace after ':'
|
||||||
E23.py:126:47: E231 [*] Missing whitespace after ':'
|
E23.py:126:47: E231 [*] Missing whitespace after ':'
|
||||||
|
|
|
|
||||||
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
||||||
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_dynamic[x::-1]):
|
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_d…
|
||||||
| ^ E231
|
| ^ E231
|
||||||
127 | pass
|
127 | pass
|
||||||
|
|
|
|
||||||
|
@ -872,7 +871,7 @@ E23.py:126:47: E231 [*] Missing whitespace after ':'
|
||||||
E23.py:126:69: E231 [*] Missing whitespace after ':'
|
E23.py:126:69: E231 [*] Missing whitespace after ':'
|
||||||
|
|
|
|
||||||
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
||||||
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_dynamic[x::-1]):
|
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_d…
|
||||||
| ^ E231
|
| ^ E231
|
||||||
127 | pass
|
127 | pass
|
||||||
|
|
|
|
||||||
|
@ -891,7 +890,7 @@ E23.py:126:69: E231 [*] Missing whitespace after ':'
|
||||||
E23.py:126:99: E231 [*] Missing whitespace after ':'
|
E23.py:126:99: E231 [*] Missing whitespace after ':'
|
||||||
|
|
|
|
||||||
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
125 | class PEP696BadWithEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes]():
|
||||||
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_dynamic[x::-1]):
|
126 | class IndentedPEP696BadWithNonEmptyBases[A:object="foo"[::-1], B:object =[[["foo", "bar"]]], C:object= bytes](object, something_d…
|
||||||
| ^ E231
|
| ^ E231
|
||||||
127 | pass
|
127 | pass
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
E501.py:5:89: E501 Line too long (123 > 88)
|
E501.py:5:89: E501 Line too long (123 > 88)
|
||||||
|
|
|
|
||||||
|
@ -50,9 +49,9 @@ E501.py:43:89: E501 Line too long (105 > 88)
|
||||||
|
|
||||||
E501.py:83:89: E501 Line too long (147 > 88)
|
E501.py:83:89: E501 Line too long (147 > 88)
|
||||||
|
|
|
|
||||||
81 | class Bar:
|
81 | …
|
||||||
82 | """
|
82 | …
|
||||||
83 | This is a long sentence that ends with a shortened URL and, therefore, could easily be broken across multiple lines ([source](https://ruff.rs))
|
83 | … URL and, therefore, could easily be broken across multiple lines ([source](https://ruff.rs))
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
84 | """
|
84 | …
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,77 +1,76 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
E501_1.py:1:89: E501 Line too long (149 > 88)
|
E501_1.py:1:89: E501 Line too long (149 > 88)
|
||||||
|
|
|
|
||||||
1 | # TODO: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
1 | …ask-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
2 | # TODO(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
2 | …figured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
3 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
3 | …sk-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:2:89: E501 Line too long (158 > 88)
|
E501_1.py:2:89: E501 Line too long (158 > 88)
|
||||||
|
|
|
|
||||||
1 | # TODO: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
1 | …ags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
2 | # TODO(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
2 | …ed task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
3 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
3 | …gs sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
4 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
4 | …task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:3:89: E501 Line too long (148 > 88)
|
E501_1.py:3:89: E501 Line too long (148 > 88)
|
||||||
|
|
|
|
||||||
1 | # TODO: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
1 | …ask-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
2 | # TODO(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
2 | …figured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
3 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
3 | …sk-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
4 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
4 | …ured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
5 | # FIXME: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
5 | …task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:4:89: E501 Line too long (155 > 88)
|
E501_1.py:4:89: E501 Line too long (155 > 88)
|
||||||
|
|
|
|
||||||
2 | # TODO(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
2 | …ured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
3 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
3 | …tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
4 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
4 | …d task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
5 | # FIXME: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
5 | …k-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
6 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
6 | …-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:5:89: E501 Line too long (150 > 88)
|
E501_1.py:5:89: E501 Line too long (150 > 88)
|
||||||
|
|
|
|
||||||
3 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
3 | …k-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
4 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
4 | …red task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
5 | # FIXME: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
5 | …ask-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
6 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
6 | …sk-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
7 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
7 | …ured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:6:89: E501 Line too long (149 > 88)
|
E501_1.py:6:89: E501 Line too long (149 > 88)
|
||||||
|
|
|
|
||||||
4 | # TODO comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
4 | …ured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
5 | # FIXME: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
5 | …task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
6 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
6 | …ask-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
7 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
7 | …gured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
8 | # FIXME(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
8 | …nfigured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:7:89: E501 Line too long (156 > 88)
|
E501_1.py:7:89: E501 Line too long (156 > 88)
|
||||||
|
|
|
|
||||||
5 | # FIXME: comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
5 | …-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
6 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
6 | …tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
7 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
7 | …d task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
8 | # FIXME(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
8 | …ured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
|
|
|
|
||||||
|
|
||||||
E501_1.py:8:89: E501 Line too long (159 > 88)
|
E501_1.py:8:89: E501 Line too long (159 > 88)
|
||||||
|
|
|
|
||||||
6 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
6 | …ags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
7 | # FIXME comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
7 | … task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
8 | # FIXME(charlie): comments starting with one of the configured task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
8 | …red task-tags sometimes are longer than line-length so that you can easily find them with `git grep`
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E501
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
|
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
F821_17.py:16:12: F821 Undefined name `DoesNotExist`
|
F821_17.py:16:12: F821 Undefined name `DoesNotExist`
|
||||||
|
|
|
|
||||||
|
@ -182,7 +181,7 @@ F821_17.py:85:15: F821 Undefined name `DoesNotExist1`
|
||||||
84 |
|
84 |
|
||||||
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
| ^^^^^^^^^^^^^ F821
|
| ^^^^^^^^^^^^^ F821
|
||||||
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist…
|
||||||
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
|
|
|
|
||||||
|
|
||||||
|
@ -192,14 +191,14 @@ F821_17.py:85:30: F821 Undefined name `DoesNotExist2`
|
||||||
84 |
|
84 |
|
||||||
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
| ^^^^^^^^^^^^^ F821
|
| ^^^^^^^^^^^^^ F821
|
||||||
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist…
|
||||||
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
|
|
|
|
||||||
|
|
||||||
F821_17.py:86:14: F821 Undefined name `DoesNotExist1`
|
F821_17.py:86:14: F821 Undefined name `DoesNotExist1`
|
||||||
|
|
|
|
||||||
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist…
|
||||||
| ^^^^^^^^^^^^^ F821
|
| ^^^^^^^^^^^^^ F821
|
||||||
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
|
|
|
|
||||||
|
@ -207,7 +206,7 @@ F821_17.py:86:14: F821 Undefined name `DoesNotExist1`
|
||||||
F821_17.py:86:29: F821 Undefined name `DoesNotExist2`
|
F821_17.py:86:29: F821 Undefined name `DoesNotExist2`
|
||||||
|
|
|
|
||||||
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist…
|
||||||
| ^^^^^^^^^^^^^ F821
|
| ^^^^^^^^^^^^^ F821
|
||||||
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
|
|
|
|
||||||
|
@ -215,7 +214,7 @@ F821_17.py:86:29: F821 Undefined name `DoesNotExist2`
|
||||||
F821_17.py:87:16: F821 Undefined name `DoesNotExist1`
|
F821_17.py:87:16: F821 Undefined name `DoesNotExist1`
|
||||||
|
|
|
|
||||||
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist…
|
||||||
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
| ^^^^^^^^^^^^^ F821
|
| ^^^^^^^^^^^^^ F821
|
||||||
88 |
|
88 |
|
||||||
|
@ -225,7 +224,7 @@ F821_17.py:87:16: F821 Undefined name `DoesNotExist1`
|
||||||
F821_17.py:87:31: F821 Undefined name `DoesNotExist2`
|
F821_17.py:87:31: F821 Undefined name `DoesNotExist2`
|
||||||
|
|
|
|
||||||
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
85 | type Foo[T = (DoesNotExist1, DoesNotExist2)] = T # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
86 | def foo[T = (DoesNotExist1, DoesNotExist2)](t: T) -> T: return t # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist…
|
||||||
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
87 | class Foo[T = (DoesNotExist1, DoesNotExist2)](list[T]): ... # F821: Undefined name `DoesNotExist1`, Undefined name `DoesNotExist2`
|
||||||
| ^^^^^^^^^^^^^ F821
|
| ^^^^^^^^^^^^^ F821
|
||||||
88 |
|
88 |
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/pylint/mod.rs
|
source: crates/ruff_linter/src/rules/pylint/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
too_many_boolean_expressions.py:11:6: PLR0916 Too many Boolean expressions (6 > 5)
|
too_many_boolean_expressions.py:11:6: PLR0916 Too many Boolean expressions (6 > 5)
|
||||||
|
|
|
|
||||||
|
@ -169,7 +168,7 @@ too_many_boolean_expressions.py:43:6: PLR0916 Too many Boolean expressions (22 >
|
||||||
43 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v:
|
43 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v:
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
||||||
44 | ...
|
44 | ...
|
||||||
45 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w:
|
45 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and …
|
||||||
|
|
|
|
||||||
|
|
||||||
too_many_boolean_expressions.py:45:6: PLR0916 Too many Boolean expressions (23 > 5)
|
too_many_boolean_expressions.py:45:6: PLR0916 Too many Boolean expressions (23 > 5)
|
||||||
|
@ -179,7 +178,7 @@ too_many_boolean_expressions.py:45:6: PLR0916 Too many Boolean expressions (23 >
|
||||||
45 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w:
|
45 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w:
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
||||||
46 | ...
|
46 | ...
|
||||||
47 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x:
|
47 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and …
|
||||||
|
|
|
|
||||||
|
|
||||||
too_many_boolean_expressions.py:47:6: PLR0916 Too many Boolean expressions (24 > 5)
|
too_many_boolean_expressions.py:47:6: PLR0916 Too many Boolean expressions (24 > 5)
|
||||||
|
@ -189,7 +188,7 @@ too_many_boolean_expressions.py:47:6: PLR0916 Too many Boolean expressions (24 >
|
||||||
47 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x:
|
47 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x:
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
||||||
48 | ...
|
48 | ...
|
||||||
49 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x and y:
|
49 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x and …
|
||||||
|
|
|
|
||||||
|
|
||||||
too_many_boolean_expressions.py:49:6: PLR0916 Too many Boolean expressions (25 > 5)
|
too_many_boolean_expressions.py:49:6: PLR0916 Too many Boolean expressions (25 > 5)
|
||||||
|
@ -199,7 +198,7 @@ too_many_boolean_expressions.py:49:6: PLR0916 Too many Boolean expressions (25 >
|
||||||
49 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x and y:
|
49 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x and y:
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLR0916
|
||||||
50 | ...
|
50 | ...
|
||||||
51 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x and y and z:
|
51 | elif (a and b) and c and d and e and f and g and h and i and j and k and l and m and n and o and p and q and r and s and t and u and v and w and x and y and …
|
||||||
|
|
|
|
||||||
|
|
||||||
too_many_boolean_expressions.py:51:6: PLR0916 Too many Boolean expressions (26 > 5)
|
too_many_boolean_expressions.py:51:6: PLR0916 Too many Boolean expressions (26 > 5)
|
||||||
|
|
|
@ -318,8 +318,7 @@ UP031_0.py:30:7: UP031 [*] Use format specifiers instead of percent format
|
||||||
UP031_0.py:33:5: UP031 [*] Use format specifiers instead of percent format
|
UP031_0.py:33:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
32 | print((
|
32 | print((
|
||||||
33 | "foo %s "
|
33 | / "foo %s "
|
||||||
| _____^
|
|
||||||
34 | | "bar %s" % (x, y)
|
34 | | "bar %s" % (x, y)
|
||||||
| |_____________________^ UP031
|
| |_____________________^ UP031
|
||||||
35 | ))
|
35 | ))
|
||||||
|
@ -341,8 +340,7 @@ UP031_0.py:33:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
UP031_0.py:38:3: UP031 [*] Use format specifiers instead of percent format
|
UP031_0.py:38:3: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
37 | print(
|
37 | print(
|
||||||
38 | "%s" % (
|
38 | / "%s" % (
|
||||||
| ___^
|
|
||||||
39 | | "trailing comma",
|
39 | | "trailing comma",
|
||||||
40 | | )
|
40 | | )
|
||||||
| |_________^ UP031
|
| |_________^ UP031
|
||||||
|
@ -518,8 +516,7 @@ UP031_0.py:58:7: UP031 [*] Use format specifiers instead of percent format
|
||||||
UP031_0.py:62:5: UP031 [*] Use format specifiers instead of percent format
|
UP031_0.py:62:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
61 | print(
|
61 | print(
|
||||||
62 | "foo %(foo)s "
|
62 | / "foo %(foo)s "
|
||||||
| _____^
|
|
||||||
63 | | "bar %(bar)s" % {"foo": x, "bar": y}
|
63 | | "bar %(bar)s" % {"foo": x, "bar": y}
|
||||||
| |________________________________________^ UP031
|
| |________________________________________^ UP031
|
||||||
64 | )
|
64 | )
|
||||||
|
@ -542,8 +539,7 @@ UP031_0.py:68:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
66 | bar = {"bar": y}
|
66 | bar = {"bar": y}
|
||||||
67 | print(
|
67 | print(
|
||||||
68 | "foo %(foo)s "
|
68 | / "foo %(foo)s "
|
||||||
| _____^
|
|
||||||
69 | | "bar %(bar)s" % {"foo": x, **bar}
|
69 | | "bar %(bar)s" % {"foo": x, **bar}
|
||||||
| |_____________________________________^ UP031
|
| |_____________________________________^ UP031
|
||||||
70 | )
|
70 | )
|
||||||
|
@ -849,8 +845,7 @@ UP031_0.py:94:1: UP031 [*] Use format specifiers instead of percent format
|
||||||
UP031_0.py:100:5: UP031 [*] Use format specifiers instead of percent format
|
UP031_0.py:100:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
99 | (
|
99 | (
|
||||||
100 | """foo %s"""
|
100 | / """foo %s"""
|
||||||
| _____^
|
|
||||||
101 | | % (x,)
|
101 | | % (x,)
|
||||||
| |__________^ UP031
|
| |__________^ UP031
|
||||||
102 | )
|
102 | )
|
||||||
|
@ -871,8 +866,7 @@ UP031_0.py:100:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
UP031_0.py:105:5: UP031 [*] Use format specifiers instead of percent format
|
UP031_0.py:105:5: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
104 | (
|
104 | (
|
||||||
105 | """
|
105 | / """
|
||||||
| _____^
|
|
||||||
106 | | foo %s
|
106 | | foo %s
|
||||||
107 | | """
|
107 | | """
|
||||||
108 | | % (x,)
|
108 | | % (x,)
|
||||||
|
@ -919,7 +913,7 @@ UP031_0.py:116:8: UP031 [*] Use format specifiers instead of percent format
|
||||||
|
|
|
|
||||||
116 | path = "%s-%s-%s.pem" % (
|
116 | path = "%s-%s-%s.pem" % (
|
||||||
| ________^
|
| ________^
|
||||||
117 | | safe_domain_name(cn), # common name, which should be filename safe because it is IDNA-encoded, but in case of a malformed cert make sure it's ok to use as a filename
|
117 | | safe_domain_name(cn), # common name, which should be filename safe because it is IDNA-encoded, but in case of a malformed cert ma…
|
||||||
118 | | cert.not_valid_after.date().isoformat().replace("-", ""), # expiration date
|
118 | | cert.not_valid_after.date().isoformat().replace("-", ""), # expiration date
|
||||||
119 | | hexlify(cert.fingerprint(hashes.SHA256())).decode("ascii")[0:8], # fingerprint prefix
|
119 | | hexlify(cert.fingerprint(hashes.SHA256())).decode("ascii")[0:8], # fingerprint prefix
|
||||||
120 | | )
|
120 | | )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue