mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 10:26:31 +08:00
[flake8-typing-imports] Complete stubs (#14262)
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
"stubs/defusedxml",
|
||||
"stubs/docker",
|
||||
"stubs/docutils",
|
||||
"stubs/flake8-typing-imports",
|
||||
"stubs/Flask-SocketIO",
|
||||
"stubs/fpdf2",
|
||||
"stubs/gdb",
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
version = "1.16.*"
|
||||
upstream_repository = "https://github.com/asottile/flake8-typing-imports"
|
||||
partial_stub = true
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = true
|
||||
|
||||
@@ -1,16 +1,40 @@
|
||||
import argparse
|
||||
import ast
|
||||
from collections.abc import Generator
|
||||
from typing import Any, ClassVar
|
||||
from typing import Any, Final, NamedTuple
|
||||
from typing_extensions import Self
|
||||
|
||||
class Version(NamedTuple):
|
||||
major: int = 0
|
||||
minor: int = 0
|
||||
patch: int = 0
|
||||
@classmethod
|
||||
def parse(cls, s: str) -> Self: ...
|
||||
|
||||
SYMBOLS: Final[list[tuple[Version, frozenset[str]]]]
|
||||
VERSIONS: Final[frozenset[Version]]
|
||||
|
||||
class Visitor(ast.NodeVisitor):
|
||||
imports: dict[str, list[tuple[int, int]]]
|
||||
attributes: dict[str, list[tuple[int, int]]]
|
||||
defined_overload: bool
|
||||
unions_pattern_or_match: list[tuple[int, int]]
|
||||
from_imported_names: set[str]
|
||||
namedtuple_methods: list[tuple[int, int]]
|
||||
namedtuple_defaults: list[tuple[int, int]]
|
||||
def __init__(self) -> None: ...
|
||||
def visit_ImportFrom(self, node: ast.ImportFrom) -> None: ...
|
||||
def visit_Attribute(self, node: ast.Attribute) -> None: ...
|
||||
def visit_FunctionDef(self, node: ast.FunctionDef) -> None: ...
|
||||
def visit_Subscript(self, node: ast.Subscript) -> None: ...
|
||||
def visit_ClassDef(self, node: ast.ClassDef) -> None: ...
|
||||
def visit_AnnAssign(self, node: ast.AnnAssign) -> None: ...
|
||||
def generic_visit(self, node: ast.AST) -> None: ...
|
||||
|
||||
class Plugin:
|
||||
name: ClassVar[str]
|
||||
version: ClassVar[str]
|
||||
@staticmethod
|
||||
def add_options(option_manager: Any) -> None: ...
|
||||
@classmethod
|
||||
def parse_options(cls, options: argparse.Namespace) -> None: ...
|
||||
def __init__(self, tree: ast.AST) -> None: ...
|
||||
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
|
||||
|
||||
def __getattr__(name: str): ... # incomplete module (other attributes are normally not accessed)
|
||||
def run(self) -> Generator[tuple[int, int, str, type[Any]]]: ...
|
||||
|
||||
Reference in New Issue
Block a user