Skip to content

Commit b3c077f

Browse files
authored
Flake8-2020: Add Final and remove Any (#12538)
1 parent f4d099d commit b3c077f

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

stubs/flake8-2020/flake8_2020.pyi

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@
44

55
import ast
66
from collections.abc import Generator
7-
from typing import Any, ClassVar
7+
from typing import ClassVar, Final
8+
from typing_extensions import Self
89

9-
YTT101: str
10-
YTT102: str
11-
YTT103: str
12-
YTT201: str
13-
YTT202: str
14-
YTT203: str
15-
YTT204: str
16-
YTT301: str
17-
YTT302: str
18-
YTT303: str
10+
YTT101: Final[str]
11+
YTT102: Final[str]
12+
YTT103: Final[str]
13+
YTT201: Final[str]
14+
YTT202: Final[str]
15+
YTT203: Final[str]
16+
YTT204: Final[str]
17+
YTT301: Final[str]
18+
YTT302: Final[str]
19+
YTT303: Final[str]
1920

2021
class Visitor(ast.NodeVisitor): ...
2122

2223
class Plugin:
2324
name: ClassVar[str]
2425
version: ClassVar[str]
2526
def __init__(self, tree: ast.AST) -> None: ...
26-
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
27+
def run(self) -> Generator[tuple[int, int, str, type[Self]], None, None]: ...

0 commit comments

Comments
 (0)