Update most test/lint dependencies (#15582)

This commit is contained in:
renovate[bot]
2026-04-01 17:54:51 +02:00
committed by GitHub
parent 8ffc43610f
commit 8b31f2639e
142 changed files with 310 additions and 357 deletions
@@ -2,6 +2,7 @@
"""
This tests that star imports work when using "all += " syntax.
"""
from __future__ import annotations
from typing import *
+2 -2
View File
@@ -741,7 +741,7 @@ class socket:
def proto(self) -> int: ...
# F811: "Redefinition of unused `timeout`"
@property
def timeout(self) -> float | None: ... # noqa: F811
def timeout(self) -> float | None: ...
if sys.platform == "win32":
def __init__(
self, family: int = ..., type: int = ..., proto: int = ..., fileno: SupportsIndex | bytes | None = None
@@ -838,7 +838,7 @@ def inet_ntop(address_family: int, packed_ip: ReadableBuffer, /) -> str: ...
def getdefaulttimeout() -> float | None: ...
# F811: "Redefinition of unused `timeout`"
def setdefaulttimeout(timeout: float | None, /) -> None: ... # noqa: F811
def setdefaulttimeout(timeout: float | None, /) -> None: ...
if sys.platform != "win32":
def sethostname(name: str, /) -> None: ...
+1 -1
View File
@@ -344,7 +344,7 @@ class HelpFormatter:
def _metavar_formatter(self, action: Action, default_metavar: str) -> Callable[[int], tuple[str, ...]]: ...
def _format_args(self, action: Action, default_metavar: str) -> str: ...
def _expand_help(self, action: Action) -> str: ...
def _iter_indented_subactions(self, action: Action) -> Generator[Action, None, None]: ...
def _iter_indented_subactions(self, action: Action) -> Generator[Action]: ...
def _split_lines(self, text: str, width: int) -> list[str]: ...
def _fill_text(self, text: str, width: int, indent: str) -> str: ...
def _get_help_string(self, action: Action) -> str | None: ...
+2 -2
View File
@@ -196,8 +196,8 @@ def open(
filename: str, mode: str = "r", encoding: str | None = None, errors: str = "strict", buffering: int = -1
) -> StreamReaderWriter: ...
def EncodedFile(file: _Stream, data_encoding: str, file_encoding: str | None = None, errors: str = "strict") -> StreamRecoder: ...
def iterencode(iterator: Iterable[str], encoding: str, errors: str = "strict") -> Generator[bytes, None, None]: ...
def iterdecode(iterator: Iterable[bytes], encoding: str, errors: str = "strict") -> Generator[str, None, None]: ...
def iterencode(iterator: Iterable[str], encoding: str, errors: str = "strict") -> Generator[bytes]: ...
def iterdecode(iterator: Iterable[bytes], encoding: str, errors: str = "strict") -> Generator[str]: ...
BOM: Final[Literal[b"\xff\xfe", b"\xfe\xff"]] # depends on `sys.byteorder`
BOM_BE: Final = b"\xfe\xff"
+1 -1
View File
@@ -97,7 +97,7 @@ class _SafeQueue(Queue[Future[Any]]):
def _on_queue_feeder_error(self, e: Exception, obj: _CallItem) -> None: ...
def _get_chunks(*iterables: Any, chunksize: int) -> Generator[tuple[Any, ...], None, None]: ...
def _get_chunks(*iterables: Any, chunksize: int) -> Generator[tuple[Any, ...]]: ...
def _process_chunk(fn: Callable[..., _T], chunk: Iterable[tuple[Any, ...]]) -> list[_T]: ...
if sys.version_info >= (3, 11):
+1 -1
View File
@@ -130,7 +130,7 @@ class Message(Generic[_HeaderT_co, _HeaderParamT_contra]):
def get_charsets(self, failobj: None = None) -> list[str | None]: ...
@overload
def get_charsets(self, failobj: _T) -> list[str | _T]: ...
def walk(self) -> Generator[Self, None, None]: ...
def walk(self) -> Generator[Self]: ...
def get_content_disposition(self) -> str | None: ...
def as_string(self, unixfrom: bool = False, maxheaderlen: int = 0, policy: Policy[Any] | None = None) -> str: ...
def as_bytes(self, unixfrom: bool = False, policy: Policy[Any] | None = None) -> bytes: ...
+1 -1
View File
@@ -6,7 +6,7 @@ from ..pytree import Base
_N = TypeVar("_N", bound=Base)
def find_excepts(nodes: Iterable[_N]) -> Generator[tuple[_N, _N], None, None]: ...
def find_excepts(nodes: Iterable[_N]) -> Generator[tuple[_N, _N]]: ...
class FixExcept(fixer_base.BaseFix):
BM_compatible: ClassVar[Literal[True]]
+1 -1
View File
@@ -5,7 +5,7 @@ from typing import ClassVar, Literal
from .. import fixer_base
from ..pytree import Node
def traverse_imports(names) -> Generator[str, None, None]: ...
def traverse_imports(names) -> Generator[str]: ...
class FixImport(fixer_base.BaseFix):
BM_compatible: ClassVar[Literal[True]]
+1 -1
View File
@@ -8,7 +8,7 @@ from ..pytree import Node
MAPPING: Final[dict[str, str]]
def alternates(members): ...
def build_pattern(mapping=...) -> Generator[str, None, None]: ...
def build_pattern(mapping=...) -> Generator[str]: ...
class FixImports(fixer_base.BaseFix):
BM_compatible: ClassVar[Literal[True]]
+1 -1
View File
@@ -8,7 +8,7 @@ def has_metaclass(parent): ...
def fixup_parse_tree(cls_node) -> None: ...
def fixup_simple_stmt(parent, i, stmt_node) -> None: ...
def remove_trailing_newline(node) -> None: ...
def find_metas(cls_node) -> Generator[tuple[Base, int, Base], None, None]: ...
def find_metas(cls_node) -> Generator[tuple[Base, int, Base]]: ...
def fixup_indent(suite) -> None: ...
class FixMetaclass(fixer_base.BaseFix):
+1 -1
View File
@@ -7,7 +7,7 @@ MAPPING: Final[dict[str, dict[str, str]]]
LOOKUP: Final[dict[tuple[str, str], str]]
def alternates(members): ...
def build_pattern() -> Generator[str, None, None]: ...
def build_pattern() -> Generator[str]: ...
class FixRenames(fixer_base.BaseFix):
BM_compatible: ClassVar[Literal[True]]
+1 -1
View File
@@ -5,7 +5,7 @@ from .fix_imports import FixImports
MAPPING: Final[dict[str, list[tuple[Literal["urllib.request", "urllib.parse", "urllib.error"], list[str]]]]]
def build_pattern() -> Generator[str, None, None]: ...
def build_pattern() -> Generator[str]: ...
class FixUrllib(FixImports):
def build_pattern(self): ...
+2 -2
View File
@@ -69,8 +69,8 @@ class RefactoringTool:
def parse_block(self, block: Iterable[str], lineno: int, indent: int) -> Node: ...
def wrap_toks(
self, block: Iterable[str], lineno: int, indent: int
) -> Generator[tuple[int, str, tuple[int, int], tuple[int, int], str], None, None]: ...
def gen_lines(self, block: Iterable[str], indent: int) -> Generator[str, None, None]: ...
) -> Generator[tuple[int, str, tuple[int, int], tuple[int, int], str]]: ...
def gen_lines(self, block: Iterable[str], indent: int) -> Generator[str]: ...
class MultiprocessingUnsupported(Exception): ...
+2 -4
View File
@@ -829,11 +829,9 @@ class stat_result(structseq[float], tuple[int, int, int, int, int, int, int, flo
# platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows)
if sys.version_info >= (3, 12) and sys.platform == "win32":
@property
@deprecated(
"""\
@deprecated("""\
Use st_birthtime instead to retrieve the file creation time. \
In the future, this property will contain the last metadata change time."""
)
In the future, this property will contain the last metadata change time.""")
def st_ctime(self) -> float: ...
else:
@property
+5 -5
View File
@@ -189,11 +189,11 @@ class Path(PurePath):
self, pattern: str, *, case_sensitive: bool | None = None, recurse_symlinks: bool = False
) -> Iterator[Self]: ...
elif sys.version_info >= (3, 12):
def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ...
def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ...
def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self]: ...
def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self]: ...
else:
def glob(self, pattern: str) -> Generator[Self, None, None]: ...
def rglob(self, pattern: str) -> Generator[Self, None, None]: ...
def glob(self, pattern: str) -> Generator[Self]: ...
def rglob(self, pattern: str) -> Generator[Self]: ...
if sys.version_info >= (3, 12):
def exists(self, *, follow_symlinks: bool = True) -> bool: ...
@@ -208,7 +208,7 @@ class Path(PurePath):
if sys.version_info >= (3, 12):
def is_junction(self) -> bool: ...
def iterdir(self) -> Generator[Self, None, None]: ...
def iterdir(self) -> Generator[Self]: ...
def lchmod(self, mode: int) -> None: ...
def lstat(self) -> stat_result: ...
def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None: ...
+2 -2
View File
@@ -365,9 +365,9 @@ class Connection:
def executescript(self, sql_script: str, /) -> Cursor: ...
def interrupt(self) -> None: ...
if sys.version_info >= (3, 13):
def iterdump(self, *, filter: str | None = None) -> Generator[str, None, None]: ...
def iterdump(self, *, filter: str | None = None) -> Generator[str]: ...
else:
def iterdump(self) -> Generator[str, None, None]: ...
def iterdump(self) -> Generator[str]: ...
def rollback(self) -> None: ...
def set_authorizer(
+2 -2
View File
@@ -151,8 +151,8 @@ class Untokenizer:
# Returns str, unless the ENCODING token is present, in which case it returns bytes.
def untokenize(iterable: Iterable[_Token]) -> str | Any: ...
def detect_encoding(readline: Callable[[], bytes | bytearray]) -> tuple[str, Sequence[bytes]]: ...
def tokenize(readline: Callable[[], bytes | bytearray]) -> Generator[TokenInfo, None, None]: ...
def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo, None, None]: ...
def tokenize(readline: Callable[[], bytes | bytearray]) -> Generator[TokenInfo]: ...
def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo]: ...
def open(filename: FileDescriptorOrPath) -> TextIO: ...
def group(*choices: str) -> str: ... # undocumented
def any(*choices: str) -> str: ... # undocumented
+5 -5
View File
@@ -111,7 +111,7 @@ def walk_tb(tb: TracebackType | None) -> Iterator[tuple[FrameType, int]]: ...
if sys.version_info >= (3, 11):
class _ExceptionPrintContext:
def indent(self) -> str: ...
def emit(self, text_gen: str | Iterable[str], margin_char: str | None = None) -> Generator[str, None, None]: ...
def emit(self, text_gen: str | Iterable[str], margin_char: str | None = None) -> Generator[str]: ...
class TracebackException:
__cause__: TracebackException | None
@@ -232,14 +232,14 @@ class TracebackException:
def __eq__(self, other: object) -> bool: ...
__hash__: ClassVar[None] # type: ignore[assignment]
if sys.version_info >= (3, 11):
def format(self, *, chain: bool = True, _ctx: _ExceptionPrintContext | None = None) -> Generator[str, None, None]: ...
def format(self, *, chain: bool = True, _ctx: _ExceptionPrintContext | None = None) -> Generator[str]: ...
else:
def format(self, *, chain: bool = True) -> Generator[str, None, None]: ...
def format(self, *, chain: bool = True) -> Generator[str]: ...
if sys.version_info >= (3, 13):
def format_exception_only(self, *, show_group: bool = False, _depth: int = 0) -> Generator[str, None, None]: ...
def format_exception_only(self, *, show_group: bool = False, _depth: int = 0) -> Generator[str]: ...
else:
def format_exception_only(self) -> Generator[str, None, None]: ...
def format_exception_only(self) -> Generator[str]: ...
if sys.version_info >= (3, 11):
def print(self, *, file: SupportsWrite[str] | None = None, chain: bool = True) -> None: ...
+3 -3
View File
@@ -8,10 +8,10 @@ xpath_tokenizer_re: Final[Pattern[str]]
_Token: TypeAlias = tuple[str, str]
_Next: TypeAlias = Callable[[], _Token]
_Callback: TypeAlias = Callable[[_SelectorContext, Iterable[Element]], Generator[Element, None, None]]
_Callback: TypeAlias = Callable[[_SelectorContext, Iterable[Element]], Generator[Element]]
_T = TypeVar("_T")
def xpath_tokenizer(pattern: str, namespaces: dict[str, str] | None = None) -> Generator[_Token, None, None]: ...
def xpath_tokenizer(pattern: str, namespaces: dict[str, str] | None = None) -> Generator[_Token]: ...
def get_parent_map(context: _SelectorContext) -> dict[Element, Element]: ...
def prepare_child(next: _Next, token: _Token) -> _Callback: ...
def prepare_star(next: _Next, token: _Token) -> _Callback: ...
@@ -32,7 +32,7 @@ def iterfind( # type: ignore[overload-overlap]
elem: Element[Any], path: Literal[""], namespaces: dict[str, str] | None = None
) -> None: ...
@overload
def iterfind(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> Generator[Element, None, None]: ...
def iterfind(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> Generator[Element]: ...
def find(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> Element | None: ...
def findall(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> list[Element]: ...
@overload
+5 -5
View File
@@ -106,12 +106,12 @@ class Element(Generic[_Tag]):
def get(self, key: str, default: _T) -> str | _T: ...
def insert(self, index: int, subelement: Element[Any], /) -> None: ...
def items(self) -> ItemsView[str, str]: ...
def iter(self, tag: str | None = None) -> Generator[Element, None, None]: ...
def iter(self, tag: str | None = None) -> Generator[Element]: ...
@overload
def iterfind(self, path: Literal[""], namespaces: dict[str, str] | None = None) -> None: ... # type: ignore[overload-overlap]
@overload
def iterfind(self, path: str, namespaces: dict[str, str] | None = None) -> Generator[Element, None, None]: ...
def itertext(self) -> Generator[str, None, None]: ...
def iterfind(self, path: str, namespaces: dict[str, str] | None = None) -> Generator[Element]: ...
def itertext(self) -> Generator[str]: ...
def keys(self) -> dict_keys[str, str]: ...
# makeelement returns the type of self in Python impl, but not in C impl
def makeelement(self, tag: _OtherTag, attrib: dict[str, str], /) -> Element[_OtherTag]: ...
@@ -159,7 +159,7 @@ class ElementTree(Generic[_Root]):
def getroot(self) -> _Root: ...
def _setroot(self, element: Element[Any]) -> None: ...
def parse(self, source: _FileRead, parser: XMLParser | None = None) -> Element: ...
def iter(self, tag: str | None = None) -> Generator[Element, None, None]: ...
def iter(self, tag: str | None = None) -> Generator[Element]: ...
def find(self, path: str, namespaces: dict[str, str] | None = None) -> Element | None: ...
@overload
def findtext(self, path: str, default: None = None, namespaces: dict[str, str] | None = None) -> str | None: ...
@@ -169,7 +169,7 @@ class ElementTree(Generic[_Root]):
@overload
def iterfind(self, path: Literal[""], namespaces: dict[str, str] | None = None) -> None: ... # type: ignore[overload-overlap]
@overload
def iterfind(self, path: str, namespaces: dict[str, str] | None = None) -> Generator[Element, None, None]: ...
def iterfind(self, path: str, namespaces: dict[str, str] | None = None) -> Generator[Element]: ...
def write(
self,
file_or_filename: _FileWrite,