Skip to content

Commit

Permalink
Add stubs for flake8-2020 (#6555)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasium authored Dec 10, 2021
1 parent 943dc5f commit 53eae77
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions stubs/flake8-2020/METADATA.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "1.6.*"
14 changes: 14 additions & 0 deletions stubs/flake8-2020/flake8_2020.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# flake8-2020 has type annotations, but PEP 561 states:
# This PEP does not support distributing typing information as part of module-only distributions or single-file modules within namespace packages.
# Therefore typeshed is the best place.

import ast
from typing import Any, ClassVar, Generator, Type

class Plugin:
name: ClassVar[str]
version: ClassVar[str]
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Generator[tuple[int, int, str, Type[Any]], None, None]: ...

def __getattr__(name: str) -> Any: ... # incomplete (other attributes are normally not accessed)

0 comments on commit 53eae77

Please sign in to comment.