Skip to content

Commit

Permalink
Update flake8-builtins to 2.3.* (#11669)
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau committed Mar 30, 2024
1 parent f36714b commit 2e240c9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion stubs/flake8-builtins/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2.2.*"
version = "2.3.*"
upstream_repository = "https://github.com/gforcada/flake8-builtins"
partial_stub = true

Expand Down
41 changes: 35 additions & 6 deletions stubs/flake8-builtins/flake8_builtins.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
import ast
from _typeshed import Incomplete
from collections.abc import Generator
from typing import Any, ClassVar
from argparse import Namespace
from binascii import Incomplete
from collections.abc import Iterator
from typing import ClassVar
from typing_extensions import TypeAlias

_Error: TypeAlias = tuple[int, int, str, type[BuiltinsChecker]]
_OptionManager: TypeAlias = Incomplete # flake8.options.manager.OptionManager

class BuiltinsChecker:
name: ClassVar[str]
version: ClassVar[str]
def __init__(self, tree: ast.AST, filename: str) -> None: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...
assign_msg: ClassVar[str]
argument_msg: ClassVar[str]
class_attribute_msg: ClassVar[str]
import_msg: ClassVar[str]
module_name_msg: ClassVar[str]

def __getattr__(name: str) -> Incomplete: ... # incomplete (other attributes are normally not accessed)
names: ClassVar[list[str]]
ignore_list: ClassVar[set[str]]
ignored_module_names: ClassVar[set[str]]

def __init__(self, tree: ast.AST, filename: str) -> None: ...
@classmethod
def add_options(cls, option_manager: _OptionManager) -> None: ...
@classmethod
def parse_options(cls, options: Namespace) -> None: ...
def run(self) -> Iterator[_Error]: ...
def check_assignment(self, statement: ast.Assign | ast.AnnAssign | ast.NamedExpr) -> Iterator[_Error]: ...
def check_function_definition(self, statement: ast.FunctionDef | ast.AsyncFunctionDef) -> Iterator[_Error]: ...
def check_for_loop(self, statement: ast.For | ast.AsyncFor) -> Iterator[_Error]: ...
def check_with(self, statement: ast.With | ast.AsyncWith) -> Iterator[_Error]: ...
def check_exception(self, statement: ast.excepthandler) -> Iterator[_Error]: ...
def check_comprehension(
self, statement: ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp
) -> Iterator[_Error]: ...
def check_import(self, statement: ast.Import | ast.ImportFrom) -> Iterator[_Error]: ...
def check_class(self, statement: ast.ClassDef) -> Iterator[_Error]: ...
def error(self, statement: ast.AST | None = None, variable: str | None = None, message: str | None = None) -> _Error: ...
def check_module_name(self, filename: str) -> Iterator[_Error]: ...

0 comments on commit 2e240c9

Please sign in to comment.