diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index b8049395d..4dfc2985a 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -49,6 +49,7 @@ "stubs/prettytable", "stubs/protobuf", "stubs/google-cloud-ndb", + "stubs/pep8-naming", "stubs/psutil", "stubs/psycopg2", "stubs/Pygments", diff --git a/stubs/pep8-naming/@tests/stubtest_allowlist.txt b/stubs/pep8-naming/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..0cceda881 --- /dev/null +++ b/stubs/pep8-naming/@tests/stubtest_allowlist.txt @@ -0,0 +1,2 @@ +pep8ext_naming.NamingChecker.__getattr__ +pep8ext_naming.NamingChecker.parse_options diff --git a/stubs/pep8-naming/METADATA.toml b/stubs/pep8-naming/METADATA.toml new file mode 100644 index 000000000..050b0f8be --- /dev/null +++ b/stubs/pep8-naming/METADATA.toml @@ -0,0 +1 @@ +version = "0.12.*" diff --git a/stubs/pep8-naming/pep8ext_naming.pyi b/stubs/pep8-naming/pep8ext_naming.pyi new file mode 100644 index 000000000..cdd4dfb19 --- /dev/null +++ b/stubs/pep8-naming/pep8ext_naming.pyi @@ -0,0 +1,28 @@ +import ast +from argparse import Namespace +from typing import Any + +__version__: str + +PYTHON_VERSION: tuple[int, int, int] +PY2: bool +CLASS_METHODS: frozenset[str] +METACLASS_BASES: frozenset[str] +METHOD_CONTAINER_NODES: set[ast.AST] + +class NamingChecker: + name: str + version: str + visitors: Any + decorator_to_type: Any + ignore_names: frozenset[str] + parents: Any + def __init__(self, tree: ast.AST, filename: str) -> None: ... + @classmethod + def add_options(cls, parser: Any) -> None: ... + @classmethod + def parse_options(cls, option: Namespace) -> None: ... + def run(self): ... + def __getattr__(self, name: str) -> Any: ... # incomplete (other attributes are normally not accessed) + +def __getattr__(name: str) -> Any: ... # incomplete (other attributes are normally not accessed)