From 8b31f2639e48b9a75adeb5c2e8de18b760680267 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:54:51 +0200 Subject: [PATCH] Update most test/lint dependencies (#15582) --- .pre-commit-config.yaml | 4 ++-- lib/ts_utils/utils.py | 2 +- requirements-tests.txt | 14 +++++------ scripts/create_baseline_stubs.py | 6 ++--- scripts/stubsabot.py | 12 ++++------ stdlib/@tests/test_cases/typing/check_all.py | 1 + stdlib/_socket.pyi | 4 ++-- stdlib/argparse.pyi | 2 +- stdlib/codecs.pyi | 4 ++-- stdlib/concurrent/futures/process.pyi | 2 +- stdlib/email/message.pyi | 2 +- stdlib/lib2to3/fixes/fix_except.pyi | 2 +- stdlib/lib2to3/fixes/fix_import.pyi | 2 +- stdlib/lib2to3/fixes/fix_imports.pyi | 2 +- stdlib/lib2to3/fixes/fix_metaclass.pyi | 2 +- stdlib/lib2to3/fixes/fix_renames.pyi | 2 +- stdlib/lib2to3/fixes/fix_urllib.pyi | 2 +- stdlib/lib2to3/refactor.pyi | 4 ++-- stdlib/os/__init__.pyi | 6 ++--- stdlib/pathlib/__init__.pyi | 10 ++++---- stdlib/sqlite3/__init__.pyi | 4 ++-- stdlib/tokenize.pyi | 4 ++-- stdlib/traceback.pyi | 10 ++++---- stdlib/xml/etree/ElementPath.pyi | 6 ++--- stdlib/xml/etree/ElementTree.pyi | 10 ++++---- .../httpx_client/oauth1_client.pyi | 2 +- .../httpx_client/oauth2_client.pyi | 4 ++-- stubs/JACK-Client/jack/__init__.pyi | 2 +- stubs/PyScreeze/pyscreeze/__init__.pyi | 8 +++---- stubs/WebOb/webob/request.pyi | 2 +- .../antlr4/ParserRuleContext.pyi | 2 +- .../antlr4/RuleContext.pyi | 2 +- stubs/bleach/bleach/html5lib_shim.pyi | 4 ++-- stubs/boltons/boltons/cacheutils.pyi | 4 ++-- stubs/boltons/boltons/dictutils.pyi | 12 +++++----- stubs/boltons/boltons/fileutils.pyi | 2 +- stubs/boltons/boltons/iterutils.pyi | 12 +++++----- stubs/boltons/boltons/jsonutils.pyi | 8 +++---- stubs/boltons/boltons/setutils.pyi | 6 ++--- stubs/boltons/boltons/strutils.pyi | 2 +- stubs/boltons/boltons/timeutils.pyi | 2 +- .../braintree/paginated_collection.pyi | 2 +- .../braintree/resource_collection.pyi | 2 +- stubs/cffi/cffi/model.pyi | 4 ++-- .../consolemenu/menu_component.pyi | 12 +++++----- stubs/croniter/croniter/croniter.pyi | 6 ++--- stubs/dirhash/dirhash/__init__.pyi | 2 +- stubs/docker/docker/api/build.pyi | 2 +- stubs/docker/docker/models/configs.pyi | 2 +- stubs/docker/docker/models/containers.pyi | 2 +- stubs/docker/docker/models/networks.pyi | 4 ++-- stubs/docker/docker/models/plugins.pyi | 6 ++--- stubs/docker/docker/models/services.pyi | 2 +- stubs/docker/docker/models/volumes.pyi | 2 +- stubs/docker/docker/transport/sshconn.pyi | 10 ++++---- .../flake8_rst_docstrings.pyi | 2 +- .../flake8_simplify/__init__.pyi | 2 +- stubs/flake8/flake8/discover_files.pyi | 2 +- stubs/flake8/flake8/plugins/finder.pyi | 2 +- stubs/flake8/flake8/plugins/pycodestyle.pyi | 4 ++-- stubs/flake8/flake8/plugins/pyflakes.pyi | 2 +- stubs/flake8/flake8/processor.pyi | 4 ++-- stubs/flake8/flake8/statistics.pyi | 2 +- stubs/flake8/flake8/style_guide.pyi | 6 ++--- stubs/fpdf2/fpdf/encryption.pyi | 2 +- stubs/fpdf2/fpdf/fonts.pyi | 2 +- .../google/cloud/ndb/_cache.pyi | 8 +++---- stubs/gunicorn/gunicorn/http/body.pyi | 2 +- stubs/httplib2/httplib2/__init__.pyi | 4 ++-- stubs/keyboard/keyboard/__init__.pyi | 2 +- .../algorithms/assortativity/pairs.pyi | 6 ++--- .../networkx/networkx/algorithms/boundary.pyi | 22 ++++++++--------- .../networkx/networkx/algorithms/bridges.pyi | 10 +++----- .../algorithms/centrality/flow_matrix.pyi | 2 +- stubs/networkx/networkx/algorithms/chains.pyi | 2 +- .../networkx/networkx/algorithms/chordal.pyi | 2 +- stubs/networkx/networkx/algorithms/clique.pyi | 4 ++-- .../algorithms/coloring/greedy_coloring.pyi | 6 ++--- .../networkx/algorithms/community/kclique.pyi | 2 +- .../community/label_propagation.pyi | 2 +- .../networkx/algorithms/community/louvain.pyi | 2 +- .../connectivity/disjoint_paths.pyi | 4 ++-- .../connectivity/edge_augmentation.pyi | 2 +- .../connectivity/edge_kcomponents.pyi | 6 ++--- .../algorithms/connectivity/kcutsets.pyi | 2 +- stubs/networkx/networkx/algorithms/dag.pyi | 12 ++++------ stubs/networkx/networkx/algorithms/euler.pyi | 6 ++--- .../algorithms/flow/networksimplex.pyi | 4 ++-- .../algorithms/isomorphism/ismags.pyi | 4 ++-- .../algorithms/isomorphism/isomorphvf2.pyi | 12 +++++----- .../algorithms/lowest_common_ancestors.pyi | 4 +--- .../networkx/algorithms/planarity.pyi | 2 +- .../algorithms/shortest_paths/unweighted.pyi | 2 +- .../networkx/algorithms/similarity.pyi | 2 +- .../networkx/algorithms/simple_paths.pyi | 2 +- stubs/networkx/networkx/algorithms/triads.pyi | 2 +- stubs/networkx/networkx/classes/function.pyi | 22 ++++++++--------- stubs/networkx/networkx/readwrite/adjlist.pyi | 2 +- .../networkx/networkx/readwrite/edgelist.pyi | 2 +- stubs/networkx/networkx/readwrite/gexf.pyi | 2 +- stubs/networkx/networkx/readwrite/gml.pyi | 2 +- stubs/networkx/networkx/readwrite/graphml.pyi | 4 ++-- .../networkx/readwrite/multiline_adjlist.pyi | 2 +- stubs/networkx/networkx/readwrite/pajek.pyi | 2 +- stubs/networkx/networkx/utils/rcm.pyi | 2 +- stubs/openpyxl/openpyxl/chart/reference.pyi | 4 ++-- .../openpyxl/comments/comment_sheet.pyi | 2 +- .../openpyxl/descriptors/sequence.pyi | 8 +++---- .../openpyxl/openpyxl/packaging/manifest.pyi | 2 +- .../openpyxl/packaging/relationship.pyi | 2 +- stubs/openpyxl/openpyxl/reader/workbook.pyi | 2 +- stubs/openpyxl/openpyxl/utils/cell.pyi | 4 ++-- stubs/openpyxl/openpyxl/utils/dataframe.pyi | 4 ++-- .../openpyxl/workbook/defined_name.pyi | 2 +- .../openpyxl/worksheet/_read_only.pyi | 4 ++-- stubs/openpyxl/openpyxl/worksheet/_reader.pyi | 2 +- stubs/openpyxl/openpyxl/worksheet/_writer.pyi | 4 ++-- .../openpyxl/worksheet/cell_range.pyi | 4 ++-- .../openpyxl/openpyxl/worksheet/worksheet.pyi | 24 +++++++++---------- stubs/peewee/peewee.pyi | 12 ++++------ .../pika/adapters/blocking_connection.pyi | 2 +- stubs/psutil/psutil/_pswindows.pyi | 12 +++++----- stubs/pyasn1/pyasn1/codec/streaming.pyi | 6 ++--- stubs/pyasn1/pyasn1/type/namedval.pyi | 2 +- stubs/pyasn1/pyasn1/type/univ.pyi | 10 ++++---- .../PyInstaller/depend/imphookapi.pyi | 2 +- stubs/pysftp/pysftp/__init__.pyi | 4 ++-- stubs/python-crontab/cronlog.pyi | 2 +- stubs/pywin32/_win32typing.pyi | 18 +++++--------- stubs/pywin32/win32/win32ras.pyi | 2 +- stubs/qrcode/qrcode/image/pure.pyi | 4 ++-- stubs/qrcode/qrcode/util.pyi | 2 +- .../reportlab/reportlab/lib/rl_safe_eval.pyi | 2 +- stubs/reportlab/reportlab/lib/utils.pyi | 4 ++-- stubs/requests/requests/utils.pyi | 2 +- stubs/seaborn/seaborn/axisgrid.pyi | 2 +- stubs/setuptools/setuptools/command/test.pyi | 6 ++--- stubs/setuptools/setuptools/installer.pyi | 6 ++--- stubs/tqdm/tqdm/contrib/__init__.pyi | 4 ++-- stubs/tqdm/tqdm/contrib/itertools.pyi | 2 +- tests/runtests.py | 6 ++--- tests/stubtest_third_party.py | 24 +++++++------------ 142 files changed, 310 insertions(+), 357 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f74781101..a01b3581a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: args: [--fix=lf] - id: check-case-conflict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 # must match requirements-tests.txt + rev: v0.15.8 # must match requirements-tests.txt hooks: - id: ruff name: Run ruff on stubs, tests and scripts @@ -27,7 +27,7 @@ repos: - "--unsafe-fixes" files: '.*test_cases/.+\.py$' - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black - repo: https://github.com/pycqa/flake8 diff --git a/lib/ts_utils/utils.py b/lib/ts_utils/utils.py index d7dd6ac0f..f8ae94913 100644 --- a/lib/ts_utils/utils.py +++ b/lib/ts_utils/utils.py @@ -50,7 +50,7 @@ PYTHON_VERSION: Final = f"{sys.version_info.major}.{sys.version_info.minor}" def strip_comments(text: str) -> str: - return text.split("#")[0].strip() + return text.split("#", maxsplit=1)[0].strip() def jsonc_to_json(text: str) -> str: diff --git a/requirements-tests.txt b/requirements-tests.txt index 79b0a6a38..3ed484e1e 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -4,20 +4,20 @@ mypy==1.20.0 pyright==1.1.408 # Libraries used by our various scripts. -aiohttp==3.13.3 +aiohttp==3.13.5 grpcio-tools>=1.76.0 # For grpc_tools.protoc -mypy-protobuf==4.0.0 -packaging==25.0 +mypy-protobuf==5.0.0 +packaging==26.0 pathspec>=1.0.3 pre-commit # Required by create_baseline_stubs.py. Must match .pre-commit-config.yaml. -ruff==0.14.10 +ruff==0.15.8 stubdefaulter==0.1.0 termcolor>=2.3 -tomli==2.3.0; python_version < "3.11" -tomlkit==0.13.3 +tomli==2.4.1; python_version < "3.11" +tomlkit==0.14.0 typing_extensions>=4.15.0rc1 -uv==0.9.22 +uv==0.11.2 # Utilities for typeshed infrastructure scripts. ts_utils @ file:lib diff --git a/scripts/create_baseline_stubs.py b/scripts/create_baseline_stubs.py index 04b2d8617..35653e7bd 100755 --- a/scripts/create_baseline_stubs.py +++ b/scripts/create_baseline_stubs.py @@ -188,12 +188,10 @@ def add_pyright_exclusion(stub_dir: Path) -> None: def main() -> None: - parser = argparse.ArgumentParser( - description="""Generate baseline stubs automatically for an installed pip package + parser = argparse.ArgumentParser(description="""Generate baseline stubs automatically for an installed pip package using stubgen. Also run Black and Ruff. If the name of the project is different from the runtime Python package name, you may - need to use --package (example: --package yaml PyYAML).""" - ) + need to use --package (example: --package yaml PyYAML).""") parser.add_argument("project", help="name of PyPI project for which to generate stubs under stubs/") parser.add_argument("--package", help="generate stubs for this Python package (default is autodetected)") args = parser.parse_args() diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py index 07b66fa21..f97bf5e40 100755 --- a/scripts/stubsabot.py +++ b/scripts/stubsabot.py @@ -844,24 +844,20 @@ def get_update_pr_body(update: Update, metadata: Mapping[str, Any]) -> str: stubtest_settings: dict[str, Any] = metadata.get("tool", {}).get("stubtest", {}) stubtest_will_run = not stubtest_settings.get("skip", False) if stubtest_will_run: - body += textwrap.dedent( - """ + body += textwrap.dedent(""" If stubtest fails for this PR: - Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR) - Fix stubtest failures in another PR, then close this PR Note that you will need to close and re-open the PR in order to trigger CI - """ - ) + """) else: - body += textwrap.dedent( - f""" + body += textwrap.dedent(f""" :warning: Review this PR manually, as stubtest is skipped in CI for {update.distribution}! Also check whether stubtest can be reenabled. :warning: - """ - ) + """) return body diff --git a/stdlib/@tests/test_cases/typing/check_all.py b/stdlib/@tests/test_cases/typing/check_all.py index de34ae329..7e48fd435 100644 --- a/stdlib/@tests/test_cases/typing/check_all.py +++ b/stdlib/@tests/test_cases/typing/check_all.py @@ -2,6 +2,7 @@ """ This tests that star imports work when using "all += " syntax. """ + from __future__ import annotations from typing import * diff --git a/stdlib/_socket.pyi b/stdlib/_socket.pyi index 372b35f22..918bffc7f 100644 --- a/stdlib/_socket.pyi +++ b/stdlib/_socket.pyi @@ -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: ... diff --git a/stdlib/argparse.pyi b/stdlib/argparse.pyi index 066896603..57650f53c 100644 --- a/stdlib/argparse.pyi +++ b/stdlib/argparse.pyi @@ -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: ... diff --git a/stdlib/codecs.pyi b/stdlib/codecs.pyi index 4dfe3fd9e..9164a4a62 100644 --- a/stdlib/codecs.pyi +++ b/stdlib/codecs.pyi @@ -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" diff --git a/stdlib/concurrent/futures/process.pyi b/stdlib/concurrent/futures/process.pyi index 071b3aba5..282bafa0b 100644 --- a/stdlib/concurrent/futures/process.pyi +++ b/stdlib/concurrent/futures/process.pyi @@ -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): diff --git a/stdlib/email/message.pyi b/stdlib/email/message.pyi index 794882b14..c586c23b9 100644 --- a/stdlib/email/message.pyi +++ b/stdlib/email/message.pyi @@ -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: ... diff --git a/stdlib/lib2to3/fixes/fix_except.pyi b/stdlib/lib2to3/fixes/fix_except.pyi index 30930a2c3..0d856e6b0 100644 --- a/stdlib/lib2to3/fixes/fix_except.pyi +++ b/stdlib/lib2to3/fixes/fix_except.pyi @@ -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]] diff --git a/stdlib/lib2to3/fixes/fix_import.pyi b/stdlib/lib2to3/fixes/fix_import.pyi index bf4b2d009..2daa18327 100644 --- a/stdlib/lib2to3/fixes/fix_import.pyi +++ b/stdlib/lib2to3/fixes/fix_import.pyi @@ -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]] diff --git a/stdlib/lib2to3/fixes/fix_imports.pyi b/stdlib/lib2to3/fixes/fix_imports.pyi index c747af529..d86ebbe21 100644 --- a/stdlib/lib2to3/fixes/fix_imports.pyi +++ b/stdlib/lib2to3/fixes/fix_imports.pyi @@ -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]] diff --git a/stdlib/lib2to3/fixes/fix_metaclass.pyi b/stdlib/lib2to3/fixes/fix_metaclass.pyi index 1b1ec8203..6ad25e9aa 100644 --- a/stdlib/lib2to3/fixes/fix_metaclass.pyi +++ b/stdlib/lib2to3/fixes/fix_metaclass.pyi @@ -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): diff --git a/stdlib/lib2to3/fixes/fix_renames.pyi b/stdlib/lib2to3/fixes/fix_renames.pyi index 652d8f15e..f095b3083 100644 --- a/stdlib/lib2to3/fixes/fix_renames.pyi +++ b/stdlib/lib2to3/fixes/fix_renames.pyi @@ -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]] diff --git a/stdlib/lib2to3/fixes/fix_urllib.pyi b/stdlib/lib2to3/fixes/fix_urllib.pyi index abdcc0f62..ab84114f9 100644 --- a/stdlib/lib2to3/fixes/fix_urllib.pyi +++ b/stdlib/lib2to3/fixes/fix_urllib.pyi @@ -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): ... diff --git a/stdlib/lib2to3/refactor.pyi b/stdlib/lib2to3/refactor.pyi index a7f382540..c33347ede 100644 --- a/stdlib/lib2to3/refactor.pyi +++ b/stdlib/lib2to3/refactor.pyi @@ -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): ... diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index a72c40483..4117a9bf7 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -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 diff --git a/stdlib/pathlib/__init__.pyi b/stdlib/pathlib/__init__.pyi index 26dde2acc..4f0941306 100644 --- a/stdlib/pathlib/__init__.pyi +++ b/stdlib/pathlib/__init__.pyi @@ -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: ... diff --git a/stdlib/sqlite3/__init__.pyi b/stdlib/sqlite3/__init__.pyi index 62b4055e1..86ae7bccd 100644 --- a/stdlib/sqlite3/__init__.pyi +++ b/stdlib/sqlite3/__init__.pyi @@ -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( diff --git a/stdlib/tokenize.pyi b/stdlib/tokenize.pyi index 00a24b4ee..0df8062d5 100644 --- a/stdlib/tokenize.pyi +++ b/stdlib/tokenize.pyi @@ -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 diff --git a/stdlib/traceback.pyi b/stdlib/traceback.pyi index 4305706af..f9d88f25a 100644 --- a/stdlib/traceback.pyi +++ b/stdlib/traceback.pyi @@ -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: ... diff --git a/stdlib/xml/etree/ElementPath.pyi b/stdlib/xml/etree/ElementPath.pyi index 80f3c55c1..5c03dd014 100644 --- a/stdlib/xml/etree/ElementPath.pyi +++ b/stdlib/xml/etree/ElementPath.pyi @@ -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 diff --git a/stdlib/xml/etree/ElementTree.pyi b/stdlib/xml/etree/ElementTree.pyi index d728fb975..6340a44bd 100644 --- a/stdlib/xml/etree/ElementTree.pyi +++ b/stdlib/xml/etree/ElementTree.pyi @@ -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, diff --git a/stubs/Authlib/authlib/integrations/httpx_client/oauth1_client.pyi b/stubs/Authlib/authlib/integrations/httpx_client/oauth1_client.pyi index 1160db3b4..253da19d5 100644 --- a/stubs/Authlib/authlib/integrations/httpx_client/oauth1_client.pyi +++ b/stubs/Authlib/authlib/integrations/httpx_client/oauth1_client.pyi @@ -12,7 +12,7 @@ _Request: TypeAlias = Incomplete # actual type is httpx.Request # Inherits from httpx.Auth class OAuth1Auth(ClientAuth): requires_request_body: bool - def auth_flow(self, request: _Request) -> Generator[_Request, _Response, None]: ... + def auth_flow(self, request: _Request) -> Generator[_Request, _Response]: ... # Inherits from httpx.AsyncClient class AsyncOAuth1Client(_OAuth1Client): diff --git a/stubs/Authlib/authlib/integrations/httpx_client/oauth2_client.pyi b/stubs/Authlib/authlib/integrations/httpx_client/oauth2_client.pyi index 79d45bd3c..e5610e67a 100644 --- a/stubs/Authlib/authlib/integrations/httpx_client/oauth2_client.pyi +++ b/stubs/Authlib/authlib/integrations/httpx_client/oauth2_client.pyi @@ -16,12 +16,12 @@ _Request: TypeAlias = Incomplete # actual type is httpx.Request # Inherits from httpx.Auth class OAuth2Auth(TokenAuth): requires_request_body: bool - def auth_flow(self, request: _Request) -> Generator[_Request, _Response, None]: ... + def auth_flow(self, request: _Request) -> Generator[_Request, _Response]: ... # Inherits from httpx.Auth class OAuth2ClientAuth(ClientAuth): requires_request_body: bool - def auth_flow(self, request: _Request) -> Generator[_Request, _Response, None]: ... + def auth_flow(self, request: _Request) -> Generator[_Request, _Response]: ... # Inherits from httpx.AsyncClient class AsyncOAuth2Client(_OAuth2Client): diff --git a/stubs/JACK-Client/jack/__init__.pyi b/stubs/JACK-Client/jack/__init__.pyi index a9aab4df7..963959b04 100644 --- a/stubs/JACK-Client/jack/__init__.pyi +++ b/stubs/JACK-Client/jack/__init__.pyi @@ -237,7 +237,7 @@ class OwnMidiPort(MidiPort, OwnPort): def max_event_size(self) -> int: ... @property def lost_midi_events(self) -> int: ... - def incoming_midi_events(self) -> Generator[tuple[int, _CBufferType], None, None]: ... + def incoming_midi_events(self) -> Generator[tuple[int, _CBufferType]]: ... def clear_buffer(self) -> None: ... def write_midi_event(self, time: int, event: bytes | Sequence[int] | _CBufferType) -> None: ... def reserve_midi_event(self, time: int, size: int) -> _CBufferType: ... diff --git a/stubs/PyScreeze/pyscreeze/__init__.pyi b/stubs/PyScreeze/pyscreeze/__init__.pyi index 1405bfba0..df9e1b3f6 100644 --- a/stubs/PyScreeze/pyscreeze/__init__.pyi +++ b/stubs/PyScreeze/pyscreeze/__init__.pyi @@ -108,7 +108,7 @@ def locateAllOnScreen( region: tuple[int, int, int, int] | None = None, step: int = 1, confidence: ConvertibleToFloat = 0.999, -) -> Generator[Box, None, None]: ... +) -> Generator[Box]: ... # _locateAll_pillow @overload @@ -120,7 +120,7 @@ def locateAllOnScreen( region: tuple[int, int, int, int] | None = None, step: int = 1, confidence: None = None, -) -> Generator[Box, None, None]: ... +) -> Generator[Box]: ... # _locateAll_opencv @overload @@ -202,7 +202,7 @@ def locateAll( region: tuple[int, int, int, int] | None = None, step: int = 1, confidence: ConvertibleToFloat = 0.999, -) -> Generator[Box, None, None]: ... +) -> Generator[Box]: ... # _locateAll_pillow @overload @@ -214,4 +214,4 @@ def locateAll( region: tuple[int, int, int, int] | None = None, step: int = 1, confidence: None = None, -) -> Generator[Box, None, None]: ... +) -> Generator[Box]: ... diff --git a/stubs/WebOb/webob/request.pyi b/stubs/WebOb/webob/request.pyi index 310c2101c..42f31a15b 100644 --- a/stubs/WebOb/webob/request.pyi +++ b/stubs/WebOb/webob/request.pyi @@ -203,7 +203,7 @@ class LegacyRequest(BaseRequest): def uscript_name(self) -> str: ... @uscript_name.setter def uscript_name(self, value: str) -> None: ... - @property # type:ignore[override] + @property # type: ignore[override] def upath_info(self) -> str: ... @upath_info.setter def upath_info(self, value: str) -> None: ... diff --git a/stubs/antlr4-python3-runtime/antlr4/ParserRuleContext.pyi b/stubs/antlr4-python3-runtime/antlr4/ParserRuleContext.pyi index ba07bd5fb..37d5b6c9d 100644 --- a/stubs/antlr4-python3-runtime/antlr4/ParserRuleContext.pyi +++ b/stubs/antlr4-python3-runtime/antlr4/ParserRuleContext.pyi @@ -32,7 +32,7 @@ class ParserRuleContext(RuleContext): def getChild(self, i: int, ttype: type[_GenericType] | None = None) -> _GenericType | None: ... def getChildren( self, predicate: Callable[[ParseTree | TerminalNode], bool] | None = None - ) -> Generator[ParseTree | TerminalNode, None, None]: ... + ) -> Generator[ParseTree | TerminalNode]: ... def getToken(self, ttype: int, i: int) -> TerminalNode | None: ... def getTokens(self, ttype: int) -> list[TerminalNode]: ... def getTypedRuleContext(self, ctxType: type[_ParserRuleContextT], i: int) -> _ParserRuleContextT | None: ... diff --git a/stubs/antlr4-python3-runtime/antlr4/RuleContext.pyi b/stubs/antlr4-python3-runtime/antlr4/RuleContext.pyi index 925e2f9fa..4edbedb1e 100644 --- a/stubs/antlr4-python3-runtime/antlr4/RuleContext.pyi +++ b/stubs/antlr4-python3-runtime/antlr4/RuleContext.pyi @@ -25,7 +25,7 @@ class RuleContext(RuleNode): def setAltNumber(self, altNumber: int) -> None: ... def getChild(self, i: int) -> Any: ... def getChildCount(self) -> int: ... - def getChildren(self) -> Generator[Any, None, None]: ... + def getChildren(self) -> Generator[Any]: ... def accept(self, visitor: ParseTreeVisitor) -> None: ... def toStringTree(self, ruleNames: list[str] | None = None, recog: Recognizer | None = None) -> str: ... def toString(self, ruleNames: list[str], stop: RuleContext) -> str: ... diff --git a/stubs/bleach/bleach/html5lib_shim.pyi b/stubs/bleach/bleach/html5lib_shim.pyi index 1904b538e..d781faa9c 100644 --- a/stubs/bleach/bleach/html5lib_shim.pyi +++ b/stubs/bleach/bleach/html5lib_shim.pyi @@ -62,8 +62,8 @@ class BleachHTMLParser(HTMLParser): class BleachHTMLSerializer(HTMLSerializer): escape_rcdata: bool - def escape_base_amp(self, stoken: str) -> Generator[str, None, None]: ... - def serialize(self, treewalker: TreeWalker, encoding: str | None = None) -> Generator[str, None, None]: ... # type: ignore[override] + def escape_base_amp(self, stoken: str) -> Generator[str]: ... + def serialize(self, treewalker: TreeWalker, encoding: str | None = None) -> Generator[str]: ... # type: ignore[override] def convert_entity(value: str) -> str | None: ... def convert_entities(text: str) -> str: ... diff --git a/stubs/boltons/boltons/cacheutils.pyi b/stubs/boltons/boltons/cacheutils.pyi index 40e786e61..8bea29a8b 100644 --- a/stubs/boltons/boltons/cacheutils.pyi +++ b/stubs/boltons/boltons/cacheutils.pyi @@ -125,9 +125,9 @@ class ThresholdCounter(Generic[_T]): def __contains__(self, key: _T) -> bool: ... def iterkeys(self) -> Iterator[_T]: ... def keys(self) -> list[_T]: ... - def itervalues(self) -> Generator[int, None, None]: ... + def itervalues(self) -> Generator[int]: ... def values(self) -> list[int]: ... - def iteritems(self) -> Generator[tuple[_T, int], None, None]: ... + def iteritems(self) -> Generator[tuple[_T, int]]: ... def items(self) -> list[tuple[_T, int]]: ... def get(self, key: _T, default: int = 0) -> int: ... def update(self, iterable: Iterable[_T] | Mapping[_T, int], **kwargs: Iterable[_T] | Mapping[_T, int]) -> None: ... diff --git a/stubs/boltons/boltons/dictutils.pyi b/stubs/boltons/boltons/dictutils.pyi index 5e609ef9a..c257fd9b6 100644 --- a/stubs/boltons/boltons/dictutils.pyi +++ b/stubs/boltons/boltons/dictutils.pyi @@ -22,9 +22,9 @@ class OrderedMultiDict(dict[_KT, _VT]): def getlist(self, k: _KT, default: list[_VT] = ...) -> list[_VT]: ... def inverted(self) -> Self: ... def items(self, multi: bool = False) -> list[tuple[_KT, _VT]]: ... # type: ignore[override] - def iteritems(self, multi: bool = False) -> Generator[tuple[_KT, _VT], None, None]: ... - def iterkeys(self, multi: bool = False) -> Generator[_KT, None, None]: ... - def itervalues(self, multi: bool = False) -> Generator[_VT, None, None]: ... + def iteritems(self, multi: bool = False) -> Generator[tuple[_KT, _VT]]: ... + def iterkeys(self, multi: bool = False) -> Generator[_KT]: ... + def itervalues(self, multi: bool = False) -> Generator[_VT]: ... def keys(self, multi: bool = False) -> list[_KT]: ... # type: ignore[override] def pop(self, k: _KT, default: _VT = ...) -> _VT: ... # type: ignore[override] def popall(self, k: _KT, default: _VT = ...) -> list[_VT]: ... @@ -47,8 +47,8 @@ OMD: TypeAlias = OrderedMultiDict[_KT, _VT] MultiDict: TypeAlias = OrderedMultiDict[_KT, _VT] class FastIterOrderedMultiDict(OrderedMultiDict[_KT, _VT]): # undocumented - def iteritems(self, multi: bool = False) -> Generator[tuple[_KT, _VT], None, None]: ... - def iterkeys(self, multi: bool = False) -> Generator[_KT, None, None]: ... + def iteritems(self, multi: bool = False) -> Generator[tuple[_KT, _VT]]: ... + def iterkeys(self, multi: bool = False) -> Generator[_KT]: ... class OneToOne(dict[_KT, _VT]): __slots__ = ("inv",) @@ -77,7 +77,7 @@ class ManyToMany(dict[_KT, frozenset[_VT]]): def __setitem__(self, key: _KT, vals: Iterable[_VT]) -> None: ... def add(self, key: _KT, val: _VT) -> None: ... def get(self, key: _KT, default: frozenset[_VT] = ...) -> frozenset[_VT]: ... # type: ignore[override] - def iteritems(self) -> Generator[tuple[_KT, _VT], None, None]: ... + def iteritems(self) -> Generator[tuple[_KT, _VT]]: ... def keys(self): ... def remove(self, key: _KT, val: _VT) -> None: ... def replace(self, key: _KT, newkey: _KT) -> None: ... diff --git a/stubs/boltons/boltons/fileutils.pyi b/stubs/boltons/boltons/fileutils.pyi index 1cf22af89..8d3bd1882 100644 --- a/stubs/boltons/boltons/fileutils.pyi +++ b/stubs/boltons/boltons/fileutils.pyi @@ -51,7 +51,7 @@ def iter_find_files( ignored: str | Iterable[str] | None = None, include_dirs: bool = False, max_depth: int | None = None, -) -> Generator[str, None, None]: ... +) -> Generator[str]: ... @overload def copy_tree( src: _StrPathT, dst: _StrPathT, symlinks: bool = False, ignore: Callable[[_StrPathT, list[str]], Iterable[str]] | None = None diff --git a/stubs/boltons/boltons/iterutils.pyi b/stubs/boltons/boltons/iterutils.pyi index ba1b7dd02..0c16dfa66 100644 --- a/stubs/boltons/boltons/iterutils.pyi +++ b/stubs/boltons/boltons/iterutils.pyi @@ -7,24 +7,24 @@ def is_collection(obj) -> bool: ... def split(src, sep=None, maxsplit=None): ... def split_iter(src, sep=None, maxsplit=None) -> Generator[Incomplete, None, Incomplete]: ... def lstrip(iterable, strip_value=None): ... -def lstrip_iter(iterable, strip_value=None) -> Generator[Incomplete, None, None]: ... +def lstrip_iter(iterable, strip_value=None) -> Generator[Incomplete]: ... def rstrip(iterable, strip_value=None): ... -def rstrip_iter(iterable, strip_value=None) -> Generator[Incomplete, None, None]: ... +def rstrip_iter(iterable, strip_value=None) -> Generator[Incomplete]: ... def strip(iterable, strip_value=None): ... def strip_iter(iterable, strip_value=None): ... def chunked(src, size, count=None, **kw): ... def chunked_iter(src, size, **kw) -> Generator[Incomplete, None, Incomplete]: ... def chunk_ranges( input_size: int, chunk_size: int, input_offset: int = 0, overlap_size: int = 0, align: bool = False -) -> Generator[tuple[int, int], None, None]: ... +) -> Generator[tuple[int, int]]: ... def pairwise(src, end=...): ... def pairwise_iter(src, end=...): ... def windowed(src, size, fill=...): ... def windowed_iter(src, size, fill=...): ... -def xfrange(stop, start=None, step: float = 1.0) -> Generator[Incomplete, None, None]: ... +def xfrange(stop, start=None, step: float = 1.0) -> Generator[Incomplete]: ... def frange(stop, start=None, step: float = 1.0): ... def backoff(start, stop, count=None, factor: float = 2.0, jitter: bool = False): ... -def backoff_iter(start, stop, count=None, factor: float = 2.0, jitter: bool = False) -> Generator[Incomplete, None, None]: ... +def backoff_iter(start, stop, count=None, factor: float = 2.0, jitter: bool = False) -> Generator[Incomplete]: ... def bucketize(src, key=..., value_transform=None, key_filter=None): ... def partition(src, key=...): ... def unique(src, key=None): ... @@ -32,7 +32,7 @@ def unique_iter(src, key=None) -> Generator[Incomplete, None, Incomplete]: ... def redundant(src, key=None, groups: bool = False): ... def one(src, default=None, key=None): ... def first(iterable, default=None, key=None): ... -def flatten_iter(iterable) -> Generator[Incomplete, None, None]: ... +def flatten_iter(iterable) -> Generator[Incomplete]: ... def flatten(iterable): ... def same(iterable, ref=...): ... def default_visit(path, key, value): ... diff --git a/stubs/boltons/boltons/jsonutils.pyi b/stubs/boltons/boltons/jsonutils.pyi index 0cc1bf7a4..276db26ef 100644 --- a/stubs/boltons/boltons/jsonutils.pyi +++ b/stubs/boltons/boltons/jsonutils.pyi @@ -5,13 +5,11 @@ from typing_extensions import Self @overload def reverse_iter_lines( file_obj: IO[bytes], blocksize: int = 4096, preseek: bool = True, encoding: None = None -) -> Generator[bytes, None, None]: ... +) -> Generator[bytes]: ... @overload -def reverse_iter_lines( - file_obj: IO[str], blocksize: int = 4096, preseek: bool = True, *, encoding: str -) -> Generator[str, None, None]: ... +def reverse_iter_lines(file_obj: IO[str], blocksize: int = 4096, preseek: bool = True, *, encoding: str) -> Generator[str]: ... @overload -def reverse_iter_lines(file_obj: IO[str], blocksize: int, preseek: bool, encoding: str) -> Generator[str, None, None]: ... +def reverse_iter_lines(file_obj: IO[str], blocksize: int, preseek: bool, encoding: str) -> Generator[str]: ... class JSONLIterator: ignore_errors: bool diff --git a/stubs/boltons/boltons/setutils.pyi b/stubs/boltons/boltons/setutils.pyi index d86104518..a72e050a4 100644 --- a/stubs/boltons/boltons/setutils.pyi +++ b/stubs/boltons/boltons/setutils.pyi @@ -17,7 +17,7 @@ class IndexedSet(MutableSet[Any]): def __len__(self) -> int: ... def __contains__(self, item: Any) -> bool: ... def __iter__(self) -> Iterator[Any]: ... - def __reversed__(self) -> Generator[Any, None, None]: ... + def __reversed__(self) -> Generator[Any]: ... @classmethod def from_iterable(cls, it: Iterable[Any]) -> Self: ... def add(self, item: Any) -> None: ... @@ -28,9 +28,9 @@ class IndexedSet(MutableSet[Any]): def issubset(self, other: Collection[Any]) -> bool: ... def issuperset(self, other: Collection[Any]) -> bool: ... def union(self, *others: Iterable[Any]) -> Self: ... - def iter_intersection(self, *others: Container[Any]) -> Generator[Any, None, None]: ... + def iter_intersection(self, *others: Container[Any]) -> Generator[Any]: ... def intersection(self, *others: Container[Any]) -> Self: ... - def iter_difference(self, *others: Iterable[Any]) -> Generator[Any, None, None]: ... + def iter_difference(self, *others: Iterable[Any]) -> Generator[Any]: ... def difference(self, *others: Iterable[Any]) -> Self: ... def symmetric_difference(self, *others: Container[Any]) -> Self: ... # __or__ = union diff --git a/stubs/boltons/boltons/strutils.pyi b/stubs/boltons/boltons/strutils.pyi index 0719a4beb..92aaf63ca 100644 --- a/stubs/boltons/boltons/strutils.pyi +++ b/stubs/boltons/boltons/strutils.pyi @@ -42,7 +42,7 @@ class HTMLTextExtractor(HTMLParser): def html2text(html: str) -> str: ... def gunzip_bytes(bytestring: ReadableBuffer) -> bytes: ... def gzip_bytes(bytestring: ReadableBuffer, level: int = 6) -> int: ... -def iter_splitlines(text: str) -> Generator[str, None, None]: ... +def iter_splitlines(text: str) -> Generator[str]: ... def indent(text: str, margin: str, newline: str = "\n", key: Callable[[str], bool] = ...) -> str: ... def is_uuid(obj, version: int = 4) -> bool: ... def escape_shell_args(args: Iterable[str], sep: str = " ", style: Literal["cmd", "sh"] | None = None) -> str: ... diff --git a/stubs/boltons/boltons/timeutils.pyi b/stubs/boltons/boltons/timeutils.pyi index 68ab72b1a..7416be362 100644 --- a/stubs/boltons/boltons/timeutils.pyi +++ b/stubs/boltons/boltons/timeutils.pyi @@ -14,7 +14,7 @@ def decimal_relative_time( ) -> tuple[float, str]: ... def relative_time(d: datetime, other: datetime | None = None, ndigits: int = 0) -> str: ... def strpdate(string: str, format: str) -> date: ... -def daterange(start: date, stop: date, step: int = 1, inclusive: bool = False) -> Generator[date, None, None]: ... +def daterange(start: date, stop: date, step: int = 1, inclusive: bool = False) -> Generator[date]: ... ZERO: timedelta HOUR: timedelta diff --git a/stubs/braintree/braintree/paginated_collection.pyi b/stubs/braintree/braintree/paginated_collection.pyi index 08cb89880..f370775e7 100644 --- a/stubs/braintree/braintree/paginated_collection.pyi +++ b/stubs/braintree/braintree/paginated_collection.pyi @@ -4,5 +4,5 @@ from collections.abc import Generator class PaginatedCollection: def __init__(self, method) -> None: ... @property - def items(self) -> Generator[Incomplete, None, None]: ... + def items(self) -> Generator[Incomplete]: ... def __iter__(self): ... diff --git a/stubs/braintree/braintree/resource_collection.pyi b/stubs/braintree/braintree/resource_collection.pyi index 5aeb21a71..80b32c2f7 100644 --- a/stubs/braintree/braintree/resource_collection.pyi +++ b/stubs/braintree/braintree/resource_collection.pyi @@ -8,7 +8,7 @@ class ResourceCollection: @property def first(self): ... @property - def items(self) -> Generator[Incomplete, None, None]: ... + def items(self) -> Generator[Incomplete]: ... @property def ids(self): ... def __iter__(self): ... diff --git a/stubs/cffi/cffi/model.pyi b/stubs/cffi/cffi/model.pyi index 5a4e7cc82..48a03c2dc 100644 --- a/stubs/cffi/cffi/model.pyi +++ b/stubs/cffi/cffi/model.pyi @@ -124,8 +124,8 @@ class StructOrUnion(StructOrUnionOrEnum): fldbitsize: Incomplete fldquals: Incomplete def __init__(self, name, fldnames, fldtypes, fldbitsize, fldquals=None) -> None: ... - def anonymous_struct_fields(self) -> Generator[StructOrUnion, None, None]: ... - def enumfields(self, expand_anonymous_struct_union: bool = True) -> Generator[Incomplete, None, None]: ... + def anonymous_struct_fields(self) -> Generator[StructOrUnion]: ... + def enumfields(self, expand_anonymous_struct_union: bool = True) -> Generator[Incomplete]: ... def force_flatten(self) -> None: ... def get_cached_btype(self, ffi, finishlist, can_delay: bool = False): ... def finish_backend_type(self, ffi, finishlist) -> None: ... diff --git a/stubs/console-menu/consolemenu/menu_component.pyi b/stubs/console-menu/consolemenu/menu_component.pyi index 5c9362118..acaf5ccb7 100644 --- a/stubs/console-menu/consolemenu/menu_component.pyi +++ b/stubs/console-menu/consolemenu/menu_component.pyi @@ -24,7 +24,7 @@ class MenuComponent: def border_style(self) -> MenuBorderStyle: ... def calculate_border_width(self) -> int: ... def calculate_content_width(self) -> int: ... - def generate(self) -> Generator[str, None, None]: ... + def generate(self) -> Generator[str]: ... def inner_horizontals(self) -> str: ... def inner_horizontal_border(self) -> str: ... def outer_horizontals(self) -> str: ... @@ -48,7 +48,7 @@ class MenuHeader(MenuComponent): subtitle_align: str = "left", show_bottom_border: bool = False, ) -> None: ... - def generate(self) -> Generator[str, None, None]: ... + def generate(self) -> Generator[str]: ... class MenuTextSection(MenuComponent): text: str @@ -64,7 +64,7 @@ class MenuTextSection(MenuComponent): show_top_border: bool = False, show_bottom_border: bool = False, ) -> None: ... - def generate(self) -> Generator[str, None, None]: ... + def generate(self) -> Generator[str]: ... class MenuItemsSection(MenuComponent): items_align: str @@ -85,10 +85,10 @@ class MenuItemsSection(MenuComponent): def items_with_top_border(self) -> list[str]: ... def show_item_bottom_border(self, item_text: str, flag: bool) -> None: ... def show_item_top_border(self, item_text: str, flag: bool) -> None: ... - def generate(self) -> Generator[str, None, None]: ... + def generate(self) -> Generator[str]: ... class MenuFooter(MenuComponent): - def generate(self) -> Generator[str, None, None]: ... + def generate(self) -> Generator[str]: ... class MenuPrompt(MenuComponent): def __init__(self, menu_style: MenuStyle, max_dimension: Dimension | None = None, prompt_string: str = ">>") -> None: ... @@ -96,4 +96,4 @@ class MenuPrompt(MenuComponent): def prompt(self) -> str: ... @prompt.setter def prompt(self, prompt: str) -> None: ... - def generate(self) -> Generator[str, None, None]: ... + def generate(self) -> Generator[str]: ... diff --git a/stubs/croniter/croniter/croniter.pyi b/stubs/croniter/croniter/croniter.pyi index fdf838474..5966b6106 100644 --- a/stubs/croniter/croniter/croniter.pyi +++ b/stubs/croniter/croniter/croniter.pyi @@ -287,7 +287,7 @@ def croniter_range( _croniter: type[croniter] | None = None, second_at_beginning: bool = False, expand_from_start_time: bool = False, -) -> Generator[_R2_co, None, None]: ... +) -> Generator[_R2_co]: ... @overload def croniter_range( start: float, @@ -299,7 +299,7 @@ def croniter_range( _croniter: type[croniter] | None = None, second_at_beginning: bool = False, expand_from_start_time: bool = False, -) -> Generator[float, None, None]: ... +) -> Generator[float]: ... @overload def croniter_range( start: datetime.datetime, @@ -311,7 +311,7 @@ def croniter_range( _croniter: type[croniter] | None = None, second_at_beginning: bool = False, expand_from_start_time: bool = False, -) -> Generator[datetime.datetime, None, None]: ... +) -> Generator[datetime.datetime]: ... class HashExpander: cron: croniter diff --git a/stubs/dirhash/dirhash/__init__.pyi b/stubs/dirhash/dirhash/__init__.pyi index 5a24f69dc..3753092bc 100644 --- a/stubs/dirhash/dirhash/__init__.pyi +++ b/stubs/dirhash/dirhash/__init__.pyi @@ -71,7 +71,7 @@ class Filter: def match_patterns(self) -> tuple[str, ...]: ... def include(self, recursion_path: _RecursionPath) -> bool: ... def match_file(self, filepath: str | PathLike[str]) -> bool: ... - def __call__(self, paths: Iterable[_RP]) -> Generator[_RP, None, None]: ... + def __call__(self, paths: Iterable[_RP]) -> Generator[_RP]: ... def get_match_patterns( match: Iterable[str] | None = None, diff --git a/stubs/docker/docker/api/build.pyi b/stubs/docker/docker/api/build.pyi index d5c0a30e4..73d69c033 100644 --- a/stubs/docker/docker/api/build.pyi +++ b/stubs/docker/docker/api/build.pyi @@ -47,7 +47,7 @@ class BuildApiMixin: platform: str | None = None, isolation: str | None = None, use_config_proxy: bool = True, - ) -> Generator[Any, None, None]: ... + ) -> Generator[Any]: ... def prune_builds( self, filters: _Filers | None = None, keep_storage: int | None = None, all: bool | None = None ) -> dict[str, Any]: ... diff --git a/stubs/docker/docker/models/configs.pyi b/stubs/docker/docker/models/configs.pyi index bac0de6a4..d77553f46 100644 --- a/stubs/docker/docker/models/configs.pyi +++ b/stubs/docker/docker/models/configs.pyi @@ -8,6 +8,6 @@ class Config(Model): class ConfigCollection(Collection[Config]): model: type[Config] - def create(self, **kwargs) -> Config: ... # type:ignore[override] + def create(self, **kwargs) -> Config: ... # type: ignore[override] def get(self, config_id: str) -> Config: ... def list(self, **kwargs) -> list[Config]: ... diff --git a/stubs/docker/docker/models/containers.pyi b/stubs/docker/docker/models/containers.pyi index 6ccde4fb9..be811aa0f 100644 --- a/stubs/docker/docker/models/containers.pyi +++ b/stubs/docker/docker/models/containers.pyi @@ -345,7 +345,7 @@ class ContainerCollection(Collection[Container]): working_dir: str | None = None, ) -> Container: ... @override - def create( # type:ignore[override] + def create( # type: ignore[override] self, image: str | Image, command: str | list[str] | None = None, diff --git a/stubs/docker/docker/models/networks.pyi b/stubs/docker/docker/models/networks.pyi index 86cca6416..d3405666a 100644 --- a/stubs/docker/docker/models/networks.pyi +++ b/stubs/docker/docker/models/networks.pyi @@ -16,7 +16,7 @@ class Network(Model): class NetworkCollection(Collection[Network]): model: type[Network] - def create( # type:ignore[override] + def create( # type: ignore[override] self, name: str, driver: str | None = None, @@ -32,6 +32,6 @@ class NetworkCollection(Collection[Network]): ) -> Network: ... def get( self, network_id: str, verbose: bool | None = None, scope: Literal["local", "global", "swarm"] | None = None - ) -> Network: ... # type:ignore[override] + ) -> Network: ... # type: ignore[override] def list(self, *args, **kwargs) -> list[Network]: ... def prune(self, filters: dict[str, Any] | None = None) -> dict[str, Any]: ... diff --git a/stubs/docker/docker/models/plugins.pyi b/stubs/docker/docker/models/plugins.pyi index 3c62a6805..9b33726d7 100644 --- a/stubs/docker/docker/models/plugins.pyi +++ b/stubs/docker/docker/models/plugins.pyi @@ -14,14 +14,14 @@ class Plugin(Model): def configure(self, options: dict[str, Any]) -> None: ... def disable(self, force: bool = False) -> None: ... def enable(self, timeout: int = 0) -> None: ... - def push(self) -> Generator[dict[str, Any], None, None]: ... + def push(self) -> Generator[dict[str, Any]]: ... def remove(self, force: bool = False) -> bool: ... - def upgrade(self, remote: str | None = None) -> Generator[dict[str, Any], None, None]: ... + def upgrade(self, remote: str | None = None) -> Generator[dict[str, Any]]: ... class PluginCollection(Collection[Plugin]): model: type[Plugin] @override - def create(self, name, plugin_data_dir, gzip: bool = False): ... # type:ignore[override] + def create(self, name, plugin_data_dir, gzip: bool = False): ... # type: ignore[override] @override def get(self, name): ... def install(self, remote_name, local_name=None): ... diff --git a/stubs/docker/docker/models/services.pyi b/stubs/docker/docker/models/services.pyi index 8e4b5ccaa..62e3d7c4d 100644 --- a/stubs/docker/docker/models/services.pyi +++ b/stubs/docker/docker/models/services.pyi @@ -15,7 +15,7 @@ class Service(Model): class ServiceCollection(Collection[Service]): model: type[Service] - def create(self, image, command=None, **kwargs): ... # type:ignore[override] + def create(self, image, command=None, **kwargs): ... # type: ignore[override] def get(self, service_id, insert_defaults=None): ... def list(self, **kwargs): ... diff --git a/stubs/docker/docker/models/volumes.pyi b/stubs/docker/docker/models/volumes.pyi index 847f0100c..29b9c124c 100644 --- a/stubs/docker/docker/models/volumes.pyi +++ b/stubs/docker/docker/models/volumes.pyi @@ -10,7 +10,7 @@ class Volume(Model): class VolumeCollection(Collection[Volume]): model: type[Volume] - def create(self, name: str | None = None, **kwargs) -> Volume: ... # type:ignore[override] + def create(self, name: str | None = None, **kwargs) -> Volume: ... # type: ignore[override] def get(self, volume_id: str) -> Volume: ... def list(self, **kwargs) -> list[Volume]: ... def prune(self, filters: dict[str, Any] | None = None) -> dict[str, Any]: ... diff --git a/stubs/docker/docker/transport/sshconn.pyi b/stubs/docker/docker/transport/sshconn.pyi index 7bb125591..c184ecb5d 100644 --- a/stubs/docker/docker/transport/sshconn.pyi +++ b/stubs/docker/docker/transport/sshconn.pyi @@ -15,11 +15,11 @@ class SSHSocket(socket.socket): user: str | None proc: subprocess.Popen[bytes] | None def __init__(self, host: str) -> None: ... - def connect(self, **kwargs) -> None: ... # type:ignore[override] - def sendall(self, data) -> None: ... # type:ignore[override] - def send(self, data): ... # type:ignore[override] - def recv(self, n): ... # type:ignore[override] - def makefile(self, mode): ... # type:ignore[override] + def connect(self, **kwargs) -> None: ... # type: ignore[override] + def sendall(self, data) -> None: ... # type: ignore[override] + def send(self, data): ... # type: ignore[override] + def recv(self, n): ... # type: ignore[override] + def makefile(self, mode): ... # type: ignore[override] def close(self) -> None: ... class SSHConnection(urllib3.connection.HTTPConnection): diff --git a/stubs/flake8-rst-docstrings/flake8_rst_docstrings.pyi b/stubs/flake8-rst-docstrings/flake8_rst_docstrings.pyi index 1ccdb3d63..b04ae53ef 100644 --- a/stubs/flake8-rst-docstrings/flake8_rst_docstrings.pyi +++ b/stubs/flake8-rst-docstrings/flake8_rst_docstrings.pyi @@ -31,4 +31,4 @@ class reStructuredTextChecker: def add_options(cls, parser: Any) -> None: ... @classmethod def parse_options(cls, options: Namespace) -> None: ... - def run(self) -> Generator[tuple[int, int, str, type[reStructuredTextChecker]], None, None]: ... + def run(self) -> Generator[tuple[int, int, str, type[reStructuredTextChecker]]]: ... diff --git a/stubs/flake8-simplify/flake8_simplify/__init__.pyi b/stubs/flake8-simplify/flake8_simplify/__init__.pyi index 6aaaeb063..161c2bf90 100644 --- a/stubs/flake8-simplify/flake8_simplify/__init__.pyi +++ b/stubs/flake8-simplify/flake8_simplify/__init__.pyi @@ -26,6 +26,6 @@ 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 run(self) -> Generator[tuple[int, int, str, type[Any]]]: ... def add_meta(root: ast.AST, level: int = 0) -> None: ... diff --git a/stubs/flake8/flake8/discover_files.pyi b/stubs/flake8/flake8/discover_files.pyi index d00b1f347..aca433fa6 100644 --- a/stubs/flake8/flake8/discover_files.pyi +++ b/stubs/flake8/flake8/discover_files.pyi @@ -5,4 +5,4 @@ LOG: Logger def expand_paths( *, paths: Sequence[str], stdin_display_name: str, filename_patterns: Sequence[str], exclude: Sequence[str] -) -> Generator[str, None, None]: ... +) -> Generator[str]: ... diff --git a/stubs/flake8/flake8/plugins/finder.pyi b/stubs/flake8/flake8/plugins/finder.pyi index 0f1949fa6..8a8a7d49a 100644 --- a/stubs/flake8/flake8/plugins/finder.pyi +++ b/stubs/flake8/flake8/plugins/finder.pyi @@ -31,7 +31,7 @@ class Plugins(NamedTuple): checkers: Checkers reporters: dict[str, LoadedPlugin] disabled: list[LoadedPlugin] - def all_plugins(self) -> Generator[LoadedPlugin, None, None]: ... + def all_plugins(self) -> Generator[LoadedPlugin]: ... def versions_str(self) -> str: ... class PluginOptions(NamedTuple): diff --git a/stubs/flake8/flake8/plugins/pycodestyle.pyi b/stubs/flake8/flake8/plugins/pycodestyle.pyi index 2a4194f96..108770a0a 100644 --- a/stubs/flake8/flake8/plugins/pycodestyle.pyi +++ b/stubs/flake8/flake8/plugins/pycodestyle.pyi @@ -19,7 +19,7 @@ def pycodestyle_logical( previous_unindented_logical_line: Any, tokens: Any, verbose: Any, -) -> Generator[tuple[int, str], None, None]: ... +) -> Generator[tuple[int, str]]: ... def pycodestyle_physical( indent_char: Any, line_number: Any, @@ -29,4 +29,4 @@ def pycodestyle_physical( noqa: Any, physical_line: Any, total_lines: Any, -) -> Generator[tuple[int, str], None, None]: ... +) -> Generator[tuple[int, str]]: ... diff --git a/stubs/flake8/flake8/plugins/pyflakes.pyi b/stubs/flake8/flake8/plugins/pyflakes.pyi index 3acc52ece..6453e63d8 100644 --- a/stubs/flake8/flake8/plugins/pyflakes.pyi +++ b/stubs/flake8/flake8/plugins/pyflakes.pyi @@ -18,4 +18,4 @@ class FlakesChecker(Checker): def add_options(cls, parser: OptionManager) -> None: ... @classmethod def parse_options(cls, options: Namespace) -> None: ... - def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ... + def run(self) -> Generator[tuple[int, int, str, type[Any]]]: ... diff --git a/stubs/flake8/flake8/processor.pyi b/stubs/flake8/flake8/processor.pyi index f193a2184..8147ab3ee 100644 --- a/stubs/flake8/flake8/processor.pyi +++ b/stubs/flake8/flake8/processor.pyi @@ -45,7 +45,7 @@ class FileProcessor: def file_tokens(self) -> list[TokenInfo]: ... def tstring_start(self, lineno: int) -> None: ... def fstring_start(self, lineno: int) -> None: ... - def multiline_string(self, token: TokenInfo) -> Generator[str, None, None]: ... + def multiline_string(self, token: TokenInfo) -> Generator[str]: ... def reset_blank_before(self) -> None: ... def delete_first_token(self) -> None: ... def visited_new_blank_line(self) -> None: ... @@ -56,7 +56,7 @@ class FileProcessor: def build_ast(self) -> AST: ... def build_logical_line(self) -> tuple[str, str, _LogicalMapping]: ... def keyword_arguments_for(self, parameters: dict[str, bool], arguments: dict[str, Any]) -> dict[str, Any]: ... - def generate_tokens(self) -> Generator[TokenInfo, None, None]: ... + def generate_tokens(self) -> Generator[TokenInfo]: ... def noqa_line_for(self, line_number: int) -> str | None: ... def next_line(self) -> str: ... def read_lines(self) -> list[str]: ... diff --git a/stubs/flake8/flake8/statistics.pyi b/stubs/flake8/flake8/statistics.pyi index c6a892985..5b7d1f551 100644 --- a/stubs/flake8/flake8/statistics.pyi +++ b/stubs/flake8/flake8/statistics.pyi @@ -7,7 +7,7 @@ class Statistics: def __init__(self) -> None: ... def error_codes(self) -> list[str]: ... def record(self, error: Violation) -> None: ... - def statistics_for(self, prefix: str, filename: str | None = None) -> Generator[Statistic, None, None]: ... + def statistics_for(self, prefix: str, filename: str | None = None) -> Generator[Statistic]: ... class Key(NamedTuple): filename: str diff --git a/stubs/flake8/flake8/style_guide.pyi b/stubs/flake8/flake8/style_guide.pyi index 7b4db3b95..bc27ec55b 100644 --- a/stubs/flake8/flake8/style_guide.pyi +++ b/stubs/flake8/flake8/style_guide.pyi @@ -41,8 +41,8 @@ class StyleGuideManager: default_style_guide: Incomplete style_guide_for: Incomplete def __init__(self, options: argparse.Namespace, formatter: BaseFormatter, decider: DecisionEngine | None = None) -> None: ... - def populate_style_guides_with(self, options: argparse.Namespace) -> Generator[StyleGuide, None, None]: ... - def processing_file(self, filename: str) -> Generator[StyleGuide, None, None]: ... + def populate_style_guides_with(self, options: argparse.Namespace) -> Generator[StyleGuide]: ... + def processing_file(self, filename: str) -> Generator[StyleGuide]: ... def handle_error( self, code: str, filename: str, line_number: int, column_number: int, text: str, physical_line: str | None = None ) -> int: ... @@ -62,7 +62,7 @@ class StyleGuide: decider: DecisionEngine | None = None, ) -> None: ... def copy(self, filename: str | None = None, extend_ignore_with: Sequence[str] | None = None) -> StyleGuide: ... - def processing_file(self, filename: str) -> Generator[StyleGuide, None, None]: ... + def processing_file(self, filename: str) -> Generator[StyleGuide]: ... def applies_to(self, filename: str) -> bool: ... def should_report_error(self, code: str) -> Decision: ... def handle_error( diff --git a/stubs/fpdf2/fpdf/encryption.pyi b/stubs/fpdf2/fpdf/encryption.pyi index 3c3edabd5..21ebb3b4c 100644 --- a/stubs/fpdf2/fpdf/encryption.pyi +++ b/stubs/fpdf2/fpdf/encryption.pyi @@ -22,7 +22,7 @@ class _SupportsGetItem(Protocol[_T_co]): class ARC4: MOD: ClassVar[int] def KSA(self, key: _Key) -> list[int]: ... - def PRGA(self, S: _SupportsGetItem[int]) -> Generator[int, None, None]: ... + def PRGA(self, S: _SupportsGetItem[int]) -> Generator[int]: ... def encrypt(self, key: _Key, text: Iterable[int]) -> list[int]: ... class CryptFilter: diff --git a/stubs/fpdf2/fpdf/fonts.pyi b/stubs/fpdf2/fpdf/fonts.pyi index 72d97ebd1..3b57d6740 100644 --- a/stubs/fpdf2/fpdf/fonts.pyi +++ b/stubs/fpdf2/fpdf/fonts.pyi @@ -171,7 +171,7 @@ class SubsetMap: font: TTFFont def __init__(self, font: TTFFont) -> None: ... def __len__(self) -> int: ... - def items(self) -> Generator[Incomplete, None, None]: ... + def items(self) -> Generator[Incomplete]: ... def pick(self, unicode: int): ... def pick_glyph(self, glyph): ... def get_glyph(self, glyph=None, unicode=None, glyph_name=None, glyph_width=None) -> Glyph: ... diff --git a/stubs/google-cloud-ndb/google/cloud/ndb/_cache.pyi b/stubs/google-cloud-ndb/google/cloud/ndb/_cache.pyi index 3f416ed30..1047e3028 100644 --- a/stubs/google-cloud-ndb/google/cloud/ndb/_cache.pyi +++ b/stubs/google-cloud-ndb/google/cloud/ndb/_cache.pyi @@ -33,12 +33,12 @@ class _GlobalCacheSetBatch(_GlobalCacheBatch): def done_callback(self, cache_call) -> None: ... def add(self, key, value): ... def make_call(self): ... - def future_info(self, key, value): ... # type:ignore[override] + def future_info(self, key, value): ... # type: ignore[override] class _GlobalCacheSetIfNotExistsBatch(_GlobalCacheSetBatch): def add(self, key, value): ... def make_call(self): ... - def future_info(self, key, value): ... # type:ignore[override] + def future_info(self, key, value): ... # type: ignore[override] global_delete: Incomplete @@ -54,7 +54,7 @@ global_watch: Incomplete class _GlobalCacheWatchBatch(_GlobalCacheDeleteBatch): def make_call(self): ... - def future_info(self, key, value): ... # type:ignore[override] + def future_info(self, key, value): ... # type: ignore[override] def global_unwatch(key): ... @@ -66,7 +66,7 @@ global_compare_and_swap: Incomplete class _GlobalCacheCompareAndSwapBatch(_GlobalCacheSetBatch): def make_call(self): ... - def future_info(self, key, value): ... # type:ignore[override] + def future_info(self, key, value): ... # type: ignore[override] def is_locked_value(value): ... def global_cache_key(key): ... diff --git a/stubs/gunicorn/gunicorn/http/body.pyi b/stubs/gunicorn/gunicorn/http/body.pyi index cc2735015..07488d019 100644 --- a/stubs/gunicorn/gunicorn/http/body.pyi +++ b/stubs/gunicorn/gunicorn/http/body.pyi @@ -7,7 +7,7 @@ from gunicorn.http.unreader import Unreader class ChunkedReader: req: Request - parser: Generator[bytes, None, None] | None + parser: Generator[bytes] | None buf: io.BytesIO def __init__(self, req: Request, unreader: Unreader) -> None: ... diff --git a/stubs/httplib2/httplib2/__init__.pyi b/stubs/httplib2/httplib2/__init__.pyi index c61d1456b..2c03f0f50 100644 --- a/stubs/httplib2/httplib2/__init__.pyi +++ b/stubs/httplib2/httplib2/__init__.pyi @@ -102,11 +102,11 @@ class Credentials: def __init__(self) -> None: ... def add(self, name, password, domain: str = "") -> None: ... def clear(self) -> None: ... - def iter(self, domain) -> Generator[tuple[str, str], None, None]: ... + def iter(self, domain) -> Generator[tuple[str, str]]: ... class KeyCerts(Credentials): def add(self, key, cert, domain, password) -> None: ... # type: ignore[override] - def iter(self, domain) -> Generator[tuple[str, str, str], None, None]: ... # type: ignore[override] + def iter(self, domain) -> Generator[tuple[str, str, str]]: ... # type: ignore[override] class AllHosts: ... diff --git a/stubs/keyboard/keyboard/__init__.pyi b/stubs/keyboard/keyboard/__init__.pyi index 432d23366..0185fa499 100644 --- a/stubs/keyboard/keyboard/__init__.pyi +++ b/stubs/keyboard/keyboard/__init__.pyi @@ -90,7 +90,7 @@ def get_hotkey_name(names: Iterable[str] | None = None) -> str: ... def read_event(suppress: bool = False) -> KeyboardEvent: ... def read_key(suppress: bool = False) -> _Key: ... def read_hotkey(suppress: bool = True) -> str: ... -def get_typed_strings(events: Iterable[KeyboardEvent], allow_backspace: bool = True) -> Generator[str, None, None]: ... +def get_typed_strings(events: Iterable[KeyboardEvent], allow_backspace: bool = True) -> Generator[str]: ... def start_recording( recorded_events_queue: Queue[KeyboardEvent] | None = None, ) -> tuple[Queue[KeyboardEvent], Callable[[], None]]: ... diff --git a/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi b/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi index 08898fc2f..502d5346f 100644 --- a/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi +++ b/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi @@ -7,10 +7,8 @@ from networkx.utils.backends import _dispatchable __all__ = ["node_attribute_xy", "node_degree_xy"] @_dispatchable -def node_attribute_xy( - G: Graph[_Node], attribute, nodes: Iterable[Incomplete] | None = None -) -> Generator[Incomplete, None, None]: ... +def node_attribute_xy(G: Graph[_Node], attribute, nodes: Iterable[Incomplete] | None = None) -> Generator[Incomplete]: ... @_dispatchable def node_degree_xy( G: Graph[_Node], x: str = "out", y: str = "in", weight: str | None = None, nodes: Iterable[Incomplete] | None = None -) -> Generator[Incomplete, None, None]: ... +) -> Generator[Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/boundary.pyi b/stubs/networkx/networkx/algorithms/boundary.pyi index 7cbec735e..b7a57b028 100644 --- a/stubs/networkx/networkx/algorithms/boundary.pyi +++ b/stubs/networkx/networkx/algorithms/boundary.pyi @@ -16,7 +16,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node], None, None]: ... +) -> Generator[tuple[_Node, _Node]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -25,7 +25,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]], None, None]: ... +) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -34,7 +34,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]], None, None]: ... +) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -43,7 +43,7 @@ def edge_boundary( data=False, keys: bool = False, default: _U | None = None, -) -> Generator[tuple[_Node, _Node, dict[str, _U]], None, None]: ... +) -> Generator[tuple[_Node, _Node, dict[str, _U]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -52,7 +52,7 @@ def edge_boundary( data=False, keys: bool = False, default: _U | None = None, -) -> Generator[tuple[_Node, _Node, dict[str, _U]], None, None]: ... +) -> Generator[tuple[_Node, _Node, dict[str, _U]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -61,7 +61,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node, int], None, None]: ... +) -> Generator[tuple[_Node, _Node, int]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -70,7 +70,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node, int], None, None]: ... +) -> Generator[tuple[_Node, _Node, int]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -79,7 +79,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]], None, None]: ... +) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -88,7 +88,7 @@ def edge_boundary( data=False, keys: bool = False, default=None, -) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]], None, None]: ... +) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -97,7 +97,7 @@ def edge_boundary( data=False, keys: bool = False, default: _U | None = None, -) -> Generator[tuple[_Node, _Node, int, dict[str, _U]], None, None]: ... +) -> Generator[tuple[_Node, _Node, int, dict[str, _U]]]: ... @overload def edge_boundary( G: Graph[_Node], @@ -106,6 +106,6 @@ def edge_boundary( data=False, keys: bool = False, default: _U | None = None, -) -> Generator[tuple[_Node, _Node, int, dict[str, _U]], None, None]: ... +) -> Generator[tuple[_Node, _Node, int, dict[str, _U]]]: ... @_dispatchable def node_boundary(G: Graph[_Node], nbunch1: Iterable[Incomplete], nbunch2: Iterable[Incomplete] | None = None) -> set[_Node]: ... diff --git a/stubs/networkx/networkx/algorithms/bridges.pyi b/stubs/networkx/networkx/algorithms/bridges.pyi index 530802159..f76eb0276 100644 --- a/stubs/networkx/networkx/algorithms/bridges.pyi +++ b/stubs/networkx/networkx/algorithms/bridges.pyi @@ -7,14 +7,10 @@ from networkx.utils.backends import _dispatchable __all__ = ["bridges", "has_bridges", "local_bridges"] @_dispatchable -def bridges(G: Graph[_Node], root: _Node | None = None) -> Generator[_Node, None, None]: ... +def bridges(G: Graph[_Node], root: _Node | None = None) -> Generator[_Node]: ... @_dispatchable def has_bridges(G: Graph[_Node], root: _Node | None = None) -> bool: ... @overload -def local_bridges( - G: Graph[_Node], with_span: bool = True, weight: str | None = None -) -> Generator[tuple[_Node, _Node], None, None]: ... +def local_bridges(G: Graph[_Node], with_span: bool = True, weight: str | None = None) -> Generator[tuple[_Node, _Node]]: ... @overload -def local_bridges( - G: Graph[_Node], with_span: bool = True, weight: str | None = None -) -> Generator[tuple[_Node, _Node, int], None, None]: ... +def local_bridges(G: Graph[_Node], with_span: bool = True, weight: str | None = None) -> Generator[tuple[_Node, _Node, int]]: ... diff --git a/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi b/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi index c8196a4e9..6b41a4822 100644 --- a/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +++ b/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi @@ -5,7 +5,7 @@ from networkx.classes.graph import Graph, _Node from networkx.utils.backends import _dispatchable @_dispatchable -def flow_matrix_row(G: Graph[_Node], weight=None, dtype=..., solver: str = "lu") -> Generator[Incomplete, None, None]: ... +def flow_matrix_row(G: Graph[_Node], weight=None, dtype=..., solver: str = "lu") -> Generator[Incomplete]: ... class InverseLaplacian: dtype: Incomplete diff --git a/stubs/networkx/networkx/algorithms/chains.pyi b/stubs/networkx/networkx/algorithms/chains.pyi index a91aed52d..00c7ed63f 100644 --- a/stubs/networkx/networkx/algorithms/chains.pyi +++ b/stubs/networkx/networkx/algorithms/chains.pyi @@ -6,4 +6,4 @@ from networkx.utils.backends import _dispatchable __all__ = ["chain_decomposition"] @_dispatchable -def chain_decomposition(G: Graph[_Node], root: _Node | None = None) -> Generator[list[tuple[_Node, _Node]], None, None]: ... +def chain_decomposition(G: Graph[_Node], root: _Node | None = None) -> Generator[list[tuple[_Node, _Node]]]: ... diff --git a/stubs/networkx/networkx/algorithms/chordal.pyi b/stubs/networkx/networkx/algorithms/chordal.pyi index 6dc458dfa..e7ad7d1d9 100644 --- a/stubs/networkx/networkx/algorithms/chordal.pyi +++ b/stubs/networkx/networkx/algorithms/chordal.pyi @@ -22,7 +22,7 @@ def is_chordal(G: Graph[_Node]) -> bool: ... @_dispatchable def find_induced_nodes(G: Graph[_Node], s: _Node, t: _Node, treewidth_bound: float = sys.maxsize) -> set[_Node]: ... @_dispatchable -def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node], None, None]: ... +def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node]]: ... @_dispatchable def chordal_graph_treewidth(G: Graph[_Node]) -> int: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/clique.pyi b/stubs/networkx/networkx/algorithms/clique.pyi index fc4203f7f..e053da521 100644 --- a/stubs/networkx/networkx/algorithms/clique.pyi +++ b/stubs/networkx/networkx/algorithms/clique.pyi @@ -17,9 +17,9 @@ __all__ = [ ] @_dispatchable -def enumerate_all_cliques(G: Graph[_Node]) -> Generator[list[_Node], None, None]: ... +def enumerate_all_cliques(G: Graph[_Node]) -> Generator[list[_Node]]: ... @_dispatchable -def find_cliques(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None) -> Generator[list[_Node], None, None]: ... +def find_cliques(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None) -> Generator[list[_Node]]: ... @_dispatchable def find_cliques_recursive(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None) -> Iterator[list[_Node]]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi b/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi index 30545b7bd..c2b6ea607 100644 --- a/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +++ b/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi @@ -24,15 +24,13 @@ def strategy_random_sequential(G: Graph[_Node], colors: Unused, seed=None): ... @_dispatchable def strategy_smallest_last(G: Graph[_Node], colors: Unused): ... @_dispatchable -def strategy_independent_set(G: Graph[_Node], colors: Unused) -> Generator[Incomplete, Incomplete, None]: ... +def strategy_independent_set(G: Graph[_Node], colors: Unused) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def strategy_connected_sequential_bfs(G: Graph[_Node], colors): ... @_dispatchable def strategy_connected_sequential_dfs(G: Graph[_Node], colors): ... @_dispatchable -def strategy_connected_sequential( - G: Graph[_Node], colors: Unused, traversal: str = "bfs" -) -> Generator[Incomplete, None, None]: ... +def strategy_connected_sequential(G: Graph[_Node], colors: Unused, traversal: str = "bfs") -> Generator[Incomplete]: ... @_dispatchable def strategy_saturation_largest_first(G: Graph[_Node], colors) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/community/kclique.pyi b/stubs/networkx/networkx/algorithms/community/kclique.pyi index 31eaf1d71..a12cf98d4 100644 --- a/stubs/networkx/networkx/algorithms/community/kclique.pyi +++ b/stubs/networkx/networkx/algorithms/community/kclique.pyi @@ -7,4 +7,4 @@ from networkx.utils.backends import _dispatchable __all__ = ["k_clique_communities"] @_dispatchable -def k_clique_communities(G: Graph[_Node], k: int, cliques=None) -> Generator[Incomplete, None, None]: ... +def k_clique_communities(G: Graph[_Node], k: int, cliques=None) -> Generator[Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/community/label_propagation.pyi b/stubs/networkx/networkx/algorithms/community/label_propagation.pyi index 6ca5d5fe3..8d50d0043 100644 --- a/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +++ b/stubs/networkx/networkx/algorithms/community/label_propagation.pyi @@ -13,6 +13,6 @@ def fast_label_propagation_communities(G: Graph[_Node], *, weight=None, seed=Non @_dispatchable def asyn_lpa_communities( G: Graph[_Node], weight: str | None = None, seed: int | RandomState | None = None -) -> Generator[Incomplete, Incomplete, None]: ... +) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def label_propagation_communities(G: Graph[_Node]) -> dict_values[Incomplete, set[Incomplete]]: ... diff --git a/stubs/networkx/networkx/algorithms/community/louvain.pyi b/stubs/networkx/networkx/algorithms/community/louvain.pyi index 103d4bf6e..b4d07e965 100644 --- a/stubs/networkx/networkx/algorithms/community/louvain.pyi +++ b/stubs/networkx/networkx/algorithms/community/louvain.pyi @@ -23,4 +23,4 @@ def louvain_partitions( resolution: float | None = 1, threshold: float | None = 1e-07, seed: int | RandomState | None = None, -) -> Generator[list[set[Incomplete]], None, None]: ... +) -> Generator[list[set[Incomplete]]]: ... diff --git a/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi b/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi index 254973fa6..1f9ab7fb4 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi @@ -18,7 +18,7 @@ def edge_disjoint_paths( cutoff: int | None = None, auxiliary: DiGraph[_Node] | None = None, residual: DiGraph[_Node] | None = None, -) -> Generator[Incomplete, None, None]: ... +) -> Generator[Incomplete]: ... @_dispatchable def node_disjoint_paths( G: Graph[_Node], @@ -28,4 +28,4 @@ def node_disjoint_paths( cutoff: int | None = None, auxiliary: DiGraph[_Node] | None = None, residual: DiGraph[_Node] | None = None, -) -> Generator[Incomplete, None, None]: ... +) -> Generator[Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi b/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi index a988852ea..db0c3a574 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi @@ -18,7 +18,7 @@ def k_edge_augmentation( avail: set[tuple[int, int]] | set[tuple[int, int, float]] | SupportsGetItem[tuple[int, int], float] | None = None, weight: str | None = None, partial: bool = False, -) -> Generator[tuple[_Node, _Node], None, None]: ... +) -> Generator[tuple[_Node, _Node]]: ... @_dispatchable def partial_k_edge_augmentation(G: Graph[_Node], k, avail, weight: str | None = None): ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi b/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi index dd4e67663..2f5f91987 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi @@ -11,7 +11,7 @@ def k_edge_components(G: Graph[_Node], k: int): ... @_dispatchable def k_edge_subgraphs(G: Graph[_Node], k: int): ... @_dispatchable -def bridge_components(G: Graph[_Node]) -> Generator[Incomplete, Incomplete, None]: ... +def bridge_components(G: Graph[_Node]) -> Generator[Incomplete, Incomplete]: ... class EdgeComponentAuxGraph: A: Incomplete @@ -19,8 +19,8 @@ class EdgeComponentAuxGraph: @classmethod def construct(cls, G: Graph[_Node]): ... - def k_edge_components(self, k: int) -> Generator[Incomplete, Incomplete, None]: ... - def k_edge_subgraphs(self, k: int) -> Generator[Incomplete, Incomplete, None]: ... + def k_edge_components(self, k: int) -> Generator[Incomplete, Incomplete]: ... + def k_edge_subgraphs(self, k: int) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def general_k_edge_subgraphs(G: Graph[_Node], k): ... diff --git a/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi b/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi index 78b0cb1be..77b4805cd 100644 --- a/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi +++ b/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi @@ -11,4 +11,4 @@ default_flow_func = edmonds_karp @_dispatchable def all_node_cuts( G: Graph[_Node], k: int | None = None, flow_func: Callable[..., Incomplete] | None = None -) -> Generator[Incomplete, None, None]: ... +) -> Generator[Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/dag.pyi b/stubs/networkx/networkx/algorithms/dag.pyi index 95f72a2d3..cd31778ee 100644 --- a/stubs/networkx/networkx/algorithms/dag.pyi +++ b/stubs/networkx/networkx/algorithms/dag.pyi @@ -30,15 +30,13 @@ def ancestors(G: Graph[_Node], source) -> set[_Node]: ... @_dispatchable def is_directed_acyclic_graph(G: Graph[_Node]) -> bool: ... @_dispatchable -def topological_generations(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ... +def topological_generations(G: DiGraph[_Node]) -> Generator[list[_Node]]: ... @_dispatchable -def topological_sort(G: DiGraph[_Node]) -> Generator[_Node, None, None]: ... +def topological_sort(G: DiGraph[_Node]) -> Generator[_Node]: ... @_dispatchable -def lexicographical_topological_sort( - G: DiGraph[_Node], key: Callable[..., Incomplete] | None = None -) -> Generator[_Node, None, None]: ... +def lexicographical_topological_sort(G: DiGraph[_Node], key: Callable[..., Incomplete] | None = None) -> Generator[_Node]: ... @_dispatchable -def all_topological_sorts(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ... +def all_topological_sorts(G: DiGraph[_Node]) -> Generator[list[_Node]]: ... @_dispatchable def is_aperiodic(G: DiGraph[_Node]) -> bool: ... @_dispatchable @@ -48,7 +46,7 @@ def transitive_closure_dag(G: DiGraph[_Node], topo_order: Iterable[Incomplete] | @_dispatchable def transitive_reduction(G: DiGraph[_Node]) -> DiGraph[_Node]: ... @_dispatchable -def antichains(G: DiGraph[_Node], topo_order: Iterable[Incomplete] | None = None) -> Generator[list[_Node], None, None]: ... +def antichains(G: DiGraph[_Node], topo_order: Iterable[Incomplete] | None = None) -> Generator[list[_Node]]: ... @_dispatchable def dag_longest_path( G: DiGraph[_Node], diff --git a/stubs/networkx/networkx/algorithms/euler.pyi b/stubs/networkx/networkx/algorithms/euler.pyi index 278aaec7b..94aeeae3f 100644 --- a/stubs/networkx/networkx/algorithms/euler.pyi +++ b/stubs/networkx/networkx/algorithms/euler.pyi @@ -11,12 +11,10 @@ def is_eulerian(G: Graph[_Node]) -> bool: ... @_dispatchable def is_semieulerian(G: Graph[_Node]) -> bool: ... @_dispatchable -def eulerian_circuit( - G: Graph[_Node], source: _Node | None = None, keys: bool = False -) -> Generator[Incomplete, Incomplete, None]: ... +def eulerian_circuit(G: Graph[_Node], source: _Node | None = None, keys: bool = False) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def has_eulerian_path(G: Graph[_Node], source: _Node | None = None) -> bool: ... @_dispatchable -def eulerian_path(G: Graph[_Node], source=None, keys: bool = False) -> Generator[Incomplete, Incomplete, None]: ... +def eulerian_path(G: Graph[_Node], source=None, keys: bool = False) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def eulerize(G: Graph[_Node]): ... diff --git a/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi b/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi index a2f58d7ca..c9a60b874 100644 --- a/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +++ b/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi @@ -34,13 +34,13 @@ class _DataEssentialsAndFunctions: def trace_path(self, p, w): ... def find_cycle(self, i, p, q): ... def augment_flow(self, Wn, We, f) -> None: ... - def trace_subtree(self, p) -> Generator[Incomplete, None, None]: ... + def trace_subtree(self, p) -> Generator[Incomplete]: ... def remove_edge(self, s, t) -> None: ... def make_root(self, q) -> None: ... def add_edge(self, i, p, q) -> None: ... def update_potentials(self, i, p, q) -> None: ... def reduced_cost(self, i): ... - def find_entering_edges(self) -> Generator[Incomplete, None, None]: ... + def find_entering_edges(self) -> Generator[Incomplete]: ... def residual_capacity(self, i, p): ... def find_leaving_edge(self, Wn, We): ... diff --git a/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi b/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi index 1deb5eedf..2f7db7c1e 100644 --- a/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi +++ b/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi @@ -24,9 +24,9 @@ class ISMAGS: def __init__(self, graph, subgraph, node_match=None, edge_match=None, cache=None) -> None: ... def create_aligned_partitions(self, thing_matcher, sg_things, g_things): ... def find_isomorphisms(self, symmetry: bool = True) -> Generator[Incomplete, Incomplete, Incomplete]: ... - def largest_common_subgraph(self, symmetry: bool = True) -> Generator[Incomplete, Incomplete, None]: ... + def largest_common_subgraph(self, symmetry: bool = True) -> Generator[Incomplete, Incomplete]: ... def analyze_subgraph_symmetry(self) -> dict[Hashable, set[Hashable]]: ... def is_isomorphic(self, symmetry: bool = False) -> bool: ... def subgraph_is_isomorphic(self, symmetry: bool = False) -> bool: ... - def isomorphisms_iter(self, symmetry: bool = True) -> Generator[Incomplete, Incomplete, None]: ... + def isomorphisms_iter(self, symmetry: bool = True) -> Generator[Incomplete, Incomplete]: ... def subgraph_isomorphisms_iter(self, symmetry: bool = True): ... diff --git a/stubs/networkx/networkx/algorithms/isomorphism/isomorphvf2.pyi b/stubs/networkx/networkx/algorithms/isomorphism/isomorphvf2.pyi index 47097ed0c..734025b38 100644 --- a/stubs/networkx/networkx/algorithms/isomorphism/isomorphvf2.pyi +++ b/stubs/networkx/networkx/algorithms/isomorphism/isomorphvf2.pyi @@ -14,7 +14,7 @@ class GraphMatcher: def __init__(self, G1, G2) -> None: ... def reset_recursion_limit(self) -> None: ... - def candidate_pairs_iter(self) -> Generator[Incomplete, None, None]: ... + def candidate_pairs_iter(self) -> Generator[Incomplete]: ... core_1: Incomplete core_2: Incomplete inout_1: Incomplete @@ -24,18 +24,18 @@ class GraphMatcher: def initialize(self) -> None: ... def is_isomorphic(self) -> bool: ... - def isomorphisms_iter(self) -> Generator[Incomplete, Incomplete, None]: ... - def match(self) -> Generator[Incomplete, Incomplete, None]: ... + def isomorphisms_iter(self) -> Generator[Incomplete, Incomplete]: ... + def match(self) -> Generator[Incomplete, Incomplete]: ... def semantic_feasibility(self, G1_node, G2_node): ... def subgraph_is_isomorphic(self): ... def subgraph_is_monomorphic(self): ... - def subgraph_isomorphisms_iter(self) -> Generator[Incomplete, Incomplete, None]: ... - def subgraph_monomorphisms_iter(self) -> Generator[Incomplete, Incomplete, None]: ... + def subgraph_isomorphisms_iter(self) -> Generator[Incomplete, Incomplete]: ... + def subgraph_monomorphisms_iter(self) -> Generator[Incomplete, Incomplete]: ... def syntactic_feasibility(self, G1_node, G2_node): ... class DiGraphMatcher(GraphMatcher): def __init__(self, G1, G2) -> None: ... - def candidate_pairs_iter(self) -> Generator[Incomplete, None, None]: ... + def candidate_pairs_iter(self) -> Generator[Incomplete]: ... core_1: Incomplete core_2: Incomplete in_1: Incomplete diff --git a/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi b/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi index ab7a8e547..8e3e2a6e3 100644 --- a/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi +++ b/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi @@ -12,6 +12,4 @@ def all_pairs_lowest_common_ancestor(G: DiGraph[_Node], pairs=None): ... @_dispatchable def lowest_common_ancestor(G: DiGraph[_Node], node1, node2, default=None): ... @_dispatchable -def tree_all_pairs_lowest_common_ancestor( - G: DiGraph[_Node], root: _Node | None = None, pairs=None -) -> Generator[Incomplete, None, None]: ... +def tree_all_pairs_lowest_common_ancestor(G: DiGraph[_Node], root: _Node | None = None, pairs=None) -> Generator[Incomplete]: ... diff --git a/stubs/networkx/networkx/algorithms/planarity.pyi b/stubs/networkx/networkx/algorithms/planarity.pyi index 87973a6e4..3eb6000d9 100644 --- a/stubs/networkx/networkx/algorithms/planarity.pyi +++ b/stubs/networkx/networkx/algorithms/planarity.pyi @@ -95,7 +95,7 @@ class LRPlanarity: class PlanarEmbedding(DiGraph[_Node]): def get_data(self) -> dict[_Node, list[_Node]]: ... def set_data(self, data: Mapping[_Node, Reversible[_Node]]) -> None: ... - def neighbors_cw_order(self, v: _Node) -> Generator[_Node, None, None]: ... + def neighbors_cw_order(self, v: _Node) -> Generator[_Node]: ... def add_half_edge(self, start_node: _Node, end_node: _Node, *, cw: _Node | None = None, ccw: _Node | None = None): ... def check_structure(self) -> None: ... def add_half_edge_ccw(self, start_node: _Node, end_node: _Node, reference_neighbor: _Node) -> None: ... diff --git a/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi b/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi index e7008bdc9..d0561d85d 100644 --- a/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi +++ b/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi @@ -20,7 +20,7 @@ def single_source_shortest_path_length(G: Graph[_Node], source: _Node, cutoff: i @_dispatchable def single_target_shortest_path_length(G: Graph[_Node], target: _Node, cutoff: int | None = None): ... @_dispatchable -def all_pairs_shortest_path_length(G: Graph[_Node], cutoff: int | None = None) -> Generator[Incomplete, None, None]: ... +def all_pairs_shortest_path_length(G: Graph[_Node], cutoff: int | None = None) -> Generator[Incomplete]: ... @_dispatchable def bidirectional_shortest_path(G: Graph[_Node], source: _Node, target: _Node) -> list[Incomplete]: ... @_dispatchable diff --git a/stubs/networkx/networkx/algorithms/similarity.pyi b/stubs/networkx/networkx/algorithms/similarity.pyi index 9b67e69e6..ccd60ca1c 100644 --- a/stubs/networkx/networkx/algorithms/similarity.pyi +++ b/stubs/networkx/networkx/algorithms/similarity.pyi @@ -59,7 +59,7 @@ def optimize_graph_edit_distance( edge_del_cost: Callable[..., Incomplete] | None = None, edge_ins_cost: Callable[..., Incomplete] | None = None, upper_bound: float | None = None, -) -> Generator[Incomplete, None, None]: ... +) -> Generator[Incomplete]: ... @_dispatchable def optimize_edit_paths( G1: Graph[_Node], diff --git a/stubs/networkx/networkx/algorithms/simple_paths.pyi b/stubs/networkx/networkx/algorithms/simple_paths.pyi index 405c00aea..f32d7d205 100644 --- a/stubs/networkx/networkx/algorithms/simple_paths.pyi +++ b/stubs/networkx/networkx/algorithms/simple_paths.pyi @@ -23,7 +23,7 @@ def shortest_simple_paths( source: _Node, target: _Node, weight: str | Callable[[Any, Any, SupportsGetItem[str, Any]], float | None] | None = None, -) -> Generator[list[_Node], None, None]: ... +) -> Generator[list[_Node]]: ... class PathBuffer: paths: Incomplete diff --git a/stubs/networkx/networkx/algorithms/triads.pyi b/stubs/networkx/networkx/algorithms/triads.pyi index 7bd9b3334..b4b8fc840 100644 --- a/stubs/networkx/networkx/algorithms/triads.pyi +++ b/stubs/networkx/networkx/algorithms/triads.pyi @@ -18,7 +18,7 @@ def triadic_census(G: DiGraph[_Node], nodelist: Collection[_Node] | None = None) @_dispatchable def is_triad(G: Graph[_Node]) -> bool: ... @_dispatchable -def all_triads(G: DiGraph[_Node]) -> Generator[Incomplete, None, None]: ... +def all_triads(G: DiGraph[_Node]) -> Generator[Incomplete]: ... @_dispatchable def triads_by_type(G: DiGraph[_Node]) -> defaultdict[Incomplete, list[Incomplete]]: ... @_dispatchable diff --git a/stubs/networkx/networkx/classes/function.pyi b/stubs/networkx/networkx/classes/function.pyi index 9ee302b90..ad5818fae 100644 --- a/stubs/networkx/networkx/classes/function.pyi +++ b/stubs/networkx/networkx/classes/function.pyi @@ -130,44 +130,44 @@ def get_edge_attributes(G: Graph[_Node], name: str, default=None) -> dict[tuple[ @_dispatchable def remove_edge_attributes(G: Graph[_Node], *attr_names, ebunch=None) -> None: ... def all_neighbors(graph: Graph[_Node], node: _Node) -> Iterator[_Node]: ... -def non_neighbors(graph: Graph[_Node], node: _Node) -> Generator[_Node, None, None]: ... -def non_edges(graph: Graph[_Node]) -> Generator[tuple[_Node, _Node], None, None]: ... -def common_neighbors(G: Graph[_Node], u: _Node, v: _Node) -> Generator[_Node, None, None]: ... +def non_neighbors(graph: Graph[_Node], node: _Node) -> Generator[_Node]: ... +def non_edges(graph: Graph[_Node]) -> Generator[tuple[_Node, _Node]]: ... +def common_neighbors(G: Graph[_Node], u: _Node, v: _Node) -> Generator[_Node]: ... @_dispatchable def is_weighted(G: Graph[_Node], edge: tuple[_Node, _Node] | None = None, weight: str = "weight") -> bool: ... @_dispatchable def is_negatively_weighted(G: Graph[_Node], edge: tuple[_Node, _Node] | None = None, weight: str = "weight") -> bool: ... @_dispatchable def is_empty(G: Graph[Hashable]) -> bool: ... -def nodes_with_selfloops(G: Graph[_Node]) -> Generator[_Node, None, None]: ... +def nodes_with_selfloops(G: Graph[_Node]) -> Generator[_Node]: ... @overload def selfloop_edges( G: Graph[_Node], data: Literal[False] = False, keys: Literal[False] = False, default=None -) -> Generator[tuple[_Node, _Node], None, None]: ... +) -> Generator[tuple[_Node, _Node]]: ... @overload def selfloop_edges( G: Graph[_Node], data: Literal[True], keys: Literal[False] = False, default=None -) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]], None, None]: ... +) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]]]: ... @overload def selfloop_edges( G: Graph[_Node], data: str, keys: Literal[False] = False, default: _U | None = None -) -> Generator[tuple[_Node, _Node, _U], None, None]: ... +) -> Generator[tuple[_Node, _Node, _U]]: ... @overload def selfloop_edges( G: Graph[_Node], data: Literal[False], keys: Literal[True], default=None -) -> Generator[tuple[_Node, _Node, int], None, None]: ... +) -> Generator[tuple[_Node, _Node, int]]: ... @overload def selfloop_edges( G: Graph[_Node], data: Literal[False] = False, *, keys: Literal[True], default=None -) -> Generator[tuple[_Node, _Node, int], None, None]: ... +) -> Generator[tuple[_Node, _Node, int]]: ... @overload def selfloop_edges( G: Graph[_Node], data: Literal[True], keys: Literal[True], default=None -) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]], None, None]: ... +) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]]]: ... @overload def selfloop_edges( G: Graph[_Node], data: str, keys: Literal[True], default: _U | None = None -) -> Generator[tuple[_Node, _Node, int, _U], None, None]: ... +) -> Generator[tuple[_Node, _Node, int, _U]]: ... @_dispatchable def number_of_selfloops(G: Graph[Hashable]) -> int: ... def is_path(G: Graph[_Node], path: Iterable[Incomplete]) -> bool: ... diff --git a/stubs/networkx/networkx/readwrite/adjlist.pyi b/stubs/networkx/networkx/readwrite/adjlist.pyi index a4f2c6188..d1013ef80 100644 --- a/stubs/networkx/networkx/readwrite/adjlist.pyi +++ b/stubs/networkx/networkx/readwrite/adjlist.pyi @@ -5,7 +5,7 @@ from networkx.utils.backends import _dispatchable __all__ = ["generate_adjlist", "write_adjlist", "parse_adjlist", "read_adjlist"] -def generate_adjlist(G: Graph[_Node], delimiter: str = " ") -> Generator[str, None, None]: ... +def generate_adjlist(G: Graph[_Node], delimiter: str = " ") -> Generator[str]: ... def write_adjlist(G: Graph[_Node], path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8") -> None: ... @_dispatchable def parse_adjlist(lines, comments: str = "#", delimiter=None, create_using=None, nodetype=None): ... diff --git a/stubs/networkx/networkx/readwrite/edgelist.pyi b/stubs/networkx/networkx/readwrite/edgelist.pyi index 1ae09b2b4..feb3ab058 100644 --- a/stubs/networkx/networkx/readwrite/edgelist.pyi +++ b/stubs/networkx/networkx/readwrite/edgelist.pyi @@ -13,7 +13,7 @@ __all__ = [ "write_weighted_edgelist", ] -def generate_edgelist(G: Graph[_Node], delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ... +def generate_edgelist(G: Graph[_Node], delimiter: str = " ", data: bool = True) -> Generator[Incomplete]: ... def write_edgelist( G: Graph[_Node], path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8" ) -> None: ... diff --git a/stubs/networkx/networkx/readwrite/gexf.pyi b/stubs/networkx/networkx/readwrite/gexf.pyi index 32825bfa6..dee0838cf 100644 --- a/stubs/networkx/networkx/readwrite/gexf.pyi +++ b/stubs/networkx/networkx/readwrite/gexf.pyi @@ -10,7 +10,7 @@ __all__ = ["write_gexf", "read_gexf", "relabel_gexf_graph", "generate_gexf"] def write_gexf(G: Graph[_Node], path, encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft") -> None: ... def generate_gexf( G: Graph[_Node], encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft" -) -> Generator[Incomplete, Incomplete, None]: ... +) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def read_gexf(path, node_type=None, relabel: bool = False, version: str = "1.2draft"): ... diff --git a/stubs/networkx/networkx/readwrite/gml.pyi b/stubs/networkx/networkx/readwrite/gml.pyi index ca73eb3cd..23817841d 100644 --- a/stubs/networkx/networkx/readwrite/gml.pyi +++ b/stubs/networkx/networkx/readwrite/gml.pyi @@ -37,5 +37,5 @@ LIST_START_VALUE: Final = "_networkx_list_start" def parse_gml_lines(lines, label, destringizer): ... def literal_stringizer(value) -> str: ... -def generate_gml(G: Graph[_Node], stringizer=None) -> Generator[Incomplete, Incomplete, None]: ... +def generate_gml(G: Graph[_Node], stringizer=None) -> Generator[Incomplete, Incomplete]: ... def write_gml(G: Graph[_Node], path, stringizer=None) -> None: ... diff --git a/stubs/networkx/networkx/readwrite/graphml.pyi b/stubs/networkx/networkx/readwrite/graphml.pyi index ffe71779a..f2395a328 100644 --- a/stubs/networkx/networkx/readwrite/graphml.pyi +++ b/stubs/networkx/networkx/readwrite/graphml.pyi @@ -36,7 +36,7 @@ def write_graphml_lxml( ): ... def generate_graphml( G: Graph[_Node], encoding: str = "utf-8", prettyprint: bool = True, named_key_ids: bool = False, edge_id_from_attribute=None -) -> Generator[Incomplete, Incomplete, None]: ... +) -> Generator[Incomplete, Incomplete]: ... @_dispatchable def read_graphml(path, node_type=..., edge_key_type=..., force_multigraph: bool = False): ... @_dispatchable @@ -121,7 +121,7 @@ class GraphMLReader(GraphML): edge_ids: Incomplete def __init__(self, node_type=..., edge_key_type=..., force_multigraph: bool = False) -> None: ... xml: Incomplete - def __call__(self, path=None, string=None) -> Generator[Incomplete, None, None]: ... + def __call__(self, path=None, string=None) -> Generator[Incomplete]: ... def make_graph(self, graph_xml, graphml_keys, defaults, G=None): ... def add_node(self, G: Graph[_Node], node_xml, graphml_keys, defaults) -> None: ... def add_edge(self, G: Graph[_Node], edge_element, graphml_keys) -> None: ... diff --git a/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi b/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi index ba5e0ad89..6de1e02a4 100644 --- a/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +++ b/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi @@ -5,7 +5,7 @@ from networkx.utils.backends import _dispatchable __all__ = ["generate_multiline_adjlist", "write_multiline_adjlist", "parse_multiline_adjlist", "read_multiline_adjlist"] -def generate_multiline_adjlist(G: Graph[_Node], delimiter: str = " ") -> Generator[str, None, None]: ... +def generate_multiline_adjlist(G: Graph[_Node], delimiter: str = " ") -> Generator[str]: ... def write_multiline_adjlist(G: Graph[_Node], path, delimiter=" ", comments="#", encoding="utf-8") -> None: ... @_dispatchable def parse_multiline_adjlist(lines, comments: str = "#", delimiter=None, create_using=None, nodetype=None, edgetype=None): ... diff --git a/stubs/networkx/networkx/readwrite/pajek.pyi b/stubs/networkx/networkx/readwrite/pajek.pyi index f51b8cd68..ec6d1d0d6 100644 --- a/stubs/networkx/networkx/readwrite/pajek.pyi +++ b/stubs/networkx/networkx/readwrite/pajek.pyi @@ -6,7 +6,7 @@ from networkx.utils.backends import _dispatchable __all__ = ["read_pajek", "parse_pajek", "generate_pajek", "write_pajek"] -def generate_pajek(G: Graph[_Node]) -> Generator[Incomplete, None, None]: ... +def generate_pajek(G: Graph[_Node]) -> Generator[Incomplete]: ... def write_pajek(G: Graph[_Node], path, encoding: str = "UTF-8") -> None: ... @_dispatchable def read_pajek(path, encoding: str = "UTF-8"): ... diff --git a/stubs/networkx/networkx/utils/rcm.pyi b/stubs/networkx/networkx/utils/rcm.pyi index 2c138df67..ec892f2f6 100644 --- a/stubs/networkx/networkx/utils/rcm.pyi +++ b/stubs/networkx/networkx/utils/rcm.pyi @@ -5,7 +5,7 @@ from networkx.classes.graph import Graph, _Node __all__ = ["cuthill_mckee_ordering", "reverse_cuthill_mckee_ordering"] -def cuthill_mckee_ordering(G: Graph[_Node], heuristic=None) -> Generator[Incomplete, Incomplete, None]: ... +def cuthill_mckee_ordering(G: Graph[_Node], heuristic=None) -> Generator[Incomplete, Incomplete]: ... def reverse_cuthill_mckee_ordering(G: Graph[_Node], heuristic=None): ... def connected_cuthill_mckee_ordering(G: Graph[_Node], heuristic=None): ... def pseudo_peripheral_node(G: Graph[_Node]): ... diff --git a/stubs/openpyxl/openpyxl/chart/reference.pyi b/stubs/openpyxl/openpyxl/chart/reference.pyi index 264bd4a59..6eb1f7e98 100644 --- a/stubs/openpyxl/openpyxl/chart/reference.pyi +++ b/stubs/openpyxl/openpyxl/chart/reference.pyi @@ -42,9 +42,9 @@ class Reference(Strict): def __len__(self) -> int: ... def __eq__(self, other: object) -> bool: ... @property - def rows(self) -> Generator[Reference, None, None]: ... + def rows(self) -> Generator[Reference]: ... @property - def cols(self) -> Generator[Reference, None, None]: ... + def cols(self) -> Generator[Reference]: ... def pop(self): ... @property def sheetname(self) -> str: ... diff --git a/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi b/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi index 51799b51c..4f51dac78 100644 --- a/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi +++ b/stubs/openpyxl/openpyxl/comments/comment_sheet.pyi @@ -116,7 +116,7 @@ class CommentSheet(Serialisable): def __init__(self, authors: AuthorList, commentList=None, extLst: Unused = None) -> None: ... def to_tree(self) -> Element: ... # type: ignore[override] @property - def comments(self) -> Generator[tuple[str, Comment], None, None]: ... + def comments(self) -> Generator[tuple[str, Comment]]: ... @classmethod def from_comments(cls, comments): ... def write_shapes(self, vml=None): ... diff --git a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi index ffad3ba35..01e44ca1a 100644 --- a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi +++ b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi @@ -32,9 +32,7 @@ class Sequence(Descriptor[_ContainerT]): container: type # internal container type, defaults to `list` # seq must be an instance of any of the declared `seq_types`. def __set__(self, instance: Serialisable | Strict, seq: Any) -> None: ... - def to_tree( - self, tagname: str | None, obj: Iterable[object], namespace: str | None = None - ) -> Generator[Element, None, None]: ... + def to_tree(self, tagname: str | None, obj: Iterable[object], namespace: str | None = None) -> Generator[Element]: ... # `_T` is the type of the elements in the sequence. class UniqueSequence(Sequence[set[_T]]): @@ -46,7 +44,7 @@ class ValueSequence(Sequence[_ContainerT]): attribute: str def to_tree( self, tagname: str, obj: Iterable[object], namespace: str | None = None # type: ignore[override] - ) -> Generator[Element, None, None]: ... + ) -> Generator[Element]: ... def from_tree(self, node: _HasGet[_T]) -> _T: ... @type_check_only @@ -68,7 +66,7 @@ class MultiSequence(Sequence[list[_T]]): def __set__(self, instance: Serialisable | Strict, seq: tuple[_T, ...] | list[_T]) -> None: ... def to_tree( self, tagname: Unused, obj: Iterable[_SupportsToTree], namespace: str | None = None # type: ignore[override] - ) -> Generator[Element, None, None]: ... + ) -> Generator[Element]: ... class MultiSequencePart(Alias): expected_type: type[Incomplete] diff --git a/stubs/openpyxl/openpyxl/packaging/manifest.pyi b/stubs/openpyxl/openpyxl/packaging/manifest.pyi index 8d0f3a15f..9700c10e2 100644 --- a/stubs/openpyxl/openpyxl/packaging/manifest.pyi +++ b/stubs/openpyxl/openpyxl/packaging/manifest.pyi @@ -37,5 +37,5 @@ class Manifest(Serialisable): def to_tree(self) -> Element: ... # type: ignore[override] def __contains__(self, content_type: str) -> bool: ... def find(self, content_type): ... - def findall(self, content_type) -> Generator[Incomplete, None, None]: ... + def findall(self, content_type) -> Generator[Incomplete]: ... def append(self, obj) -> None: ... diff --git a/stubs/openpyxl/openpyxl/packaging/relationship.pyi b/stubs/openpyxl/openpyxl/packaging/relationship.pyi index 1a1ea10a1..219fe46da 100644 --- a/stubs/openpyxl/openpyxl/packaging/relationship.pyi +++ b/stubs/openpyxl/openpyxl/packaging/relationship.pyi @@ -34,7 +34,7 @@ class Relationship(Serialisable): class RelationshipList(ElementList[Relationship]): expected_type: type[Relationship] - def find(self, content_type: str) -> Generator[Relationship, None, None]: ... + def find(self, content_type: str) -> Generator[Relationship]: ... def get(self, key: str) -> Relationship: ... def to_dict(self) -> dict[Incomplete, Relationship]: ... diff --git a/stubs/openpyxl/openpyxl/reader/workbook.pyi b/stubs/openpyxl/openpyxl/reader/workbook.pyi index 4faa3c1f5..7a8f3bec6 100644 --- a/stubs/openpyxl/openpyxl/reader/workbook.pyi +++ b/stubs/openpyxl/openpyxl/reader/workbook.pyi @@ -18,7 +18,7 @@ class WorkbookParser: # Errors if "parse" is never called. caches: list[PivotCache] def parse(self) -> None: ... - def find_sheets(self) -> Generator[tuple[ChildSheet, Relationship], None, None]: ... + def find_sheets(self) -> Generator[tuple[ChildSheet, Relationship]]: ... def assign_names(self) -> None: ... @property def pivot_caches(self) -> dict[int, CacheDefinition]: ... diff --git a/stubs/openpyxl/openpyxl/utils/cell.pyi b/stubs/openpyxl/openpyxl/utils/cell.pyi index 22a05774e..49e751e7a 100644 --- a/stubs/openpyxl/openpyxl/utils/cell.pyi +++ b/stubs/openpyxl/openpyxl/utils/cell.pyi @@ -20,8 +20,8 @@ def absolute_coordinate(coord_string: str) -> str: ... def get_column_letter(col_idx: int) -> str: ... def column_index_from_string(col: str) -> int: ... def range_boundaries(range_string: str) -> _RangeBoundariesTuple: ... -def rows_from_range(range_string: str) -> Generator[tuple[str, ...], None, None]: ... -def cols_from_range(range_string: str) -> Generator[tuple[str, ...], None, None]: ... +def rows_from_range(range_string: str) -> Generator[tuple[str, ...]]: ... +def cols_from_range(range_string: str) -> Generator[tuple[str, ...]]: ... def coordinate_to_tuple(coordinate: str) -> tuple[int, int]: ... def range_to_tuple(range_string: str) -> tuple[str, _RangeBoundariesTuple]: ... def quote_sheetname(sheetname: str) -> str: ... diff --git a/stubs/openpyxl/openpyxl/utils/dataframe.pyi b/stubs/openpyxl/openpyxl/utils/dataframe.pyi index d82d6c3c6..592aded19 100644 --- a/stubs/openpyxl/openpyxl/utils/dataframe.pyi +++ b/stubs/openpyxl/openpyxl/utils/dataframe.pyi @@ -1,5 +1,5 @@ from _typeshed import Incomplete from collections.abc import Generator -def dataframe_to_rows(df, index: bool = True, header: bool = True) -> Generator[Incomplete, None, None]: ... -def expand_index(index, header: bool = False) -> Generator[Incomplete, None, None]: ... +def dataframe_to_rows(df, index: bool = True, header: bool = True) -> Generator[Incomplete]: ... +def expand_index(index, header: bool = False) -> Generator[Incomplete]: ... diff --git a/stubs/openpyxl/openpyxl/workbook/defined_name.pyi b/stubs/openpyxl/openpyxl/workbook/defined_name.pyi index aeda5c7e8..aa8780463 100644 --- a/stubs/openpyxl/openpyxl/workbook/defined_name.pyi +++ b/stubs/openpyxl/openpyxl/workbook/defined_name.pyi @@ -53,7 +53,7 @@ class DefinedName(Serialisable): @property def type(self) -> _TokenTypesNotOperand | _TokenOperandSubtypes: ... @property - def destinations(self) -> Generator[tuple[str, str], None, None]: ... + def destinations(self) -> Generator[tuple[str, str]]: ... @property def is_reserved(self) -> str | None: ... @property diff --git a/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi b/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi index fbd34ec81..a1f95ee4b 100644 --- a/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi @@ -15,11 +15,11 @@ class ReadOnlyWorksheet: # Same as Worksheet.values # https://github.com/python/mypy/issues/6700 @property - def values(self) -> Generator[tuple[_CellGetValue, ...], None, None]: ... + def values(self) -> Generator[tuple[_CellGetValue, ...]]: ... # Same as Worksheet.rows # https://github.com/python/mypy/issues/6700 @property - def rows(self) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ... + def rows(self) -> Generator[tuple[_CellOrMergedCell, ...]]: ... __getitem__ = Worksheet.__getitem__ __iter__ = Worksheet.__iter__ parent: Workbook diff --git a/stubs/openpyxl/openpyxl/worksheet/_reader.pyi b/stubs/openpyxl/openpyxl/worksheet/_reader.pyi index 420fc3dac..789dd30f6 100644 --- a/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/_reader.pyi @@ -84,7 +84,7 @@ class WorkSheetParser: timedelta_formats: Container[int] = ..., rich_text: bool = False, ) -> None: ... - def parse(self) -> Generator[Incomplete, None, None]: ... + def parse(self) -> Generator[Incomplete]: ... def parse_dimensions(self) -> _RangeBoundariesTuple | None: ... def parse_cell(self, element) -> dict[str, _AnyCellValue]: ... def parse_formula(self, element): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/_writer.pyi b/stubs/openpyxl/openpyxl/worksheet/_writer.pyi index 92ca8dc7b..f1672f3f1 100644 --- a/stubs/openpyxl/openpyxl/worksheet/_writer.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/_writer.pyi @@ -24,7 +24,7 @@ def create_temporary_file(suffix: str = "") -> str: ... class WorksheetWriter: ws: Worksheet | WriteOnlyWorksheet out: _OutType - xf: Generator[Incomplete | None, Incomplete, None] + xf: Generator[Incomplete | None, Incomplete] def __init__(self, ws: Worksheet | WriteOnlyWorksheet, out: _OutType | None = None) -> None: ... def write_properties(self) -> None: ... def write_dimensions(self) -> None: ... @@ -51,7 +51,7 @@ class WorksheetWriter: def write_drawings(self) -> None: ... def write_legacy(self) -> None: ... def write_tables(self) -> None: ... - def get_stream(self) -> Generator[Incomplete | None, bool | None, None]: ... + def get_stream(self) -> Generator[Incomplete | None, bool | None]: ... def write_tail(self) -> None: ... def write(self) -> None: ... def close(self) -> None: ... diff --git a/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi b/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi index 9b2ca08e5..5d5094755 100644 --- a/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/cell_range.pyi @@ -53,9 +53,9 @@ class CellRange(Serialisable): @property def coord(self) -> str: ... @property - def rows(self) -> Generator[list[tuple[int, int]], None, None]: ... + def rows(self) -> Generator[list[tuple[int, int]]]: ... @property - def cols(self) -> Generator[list[tuple[int, int]], None, None]: ... + def cols(self) -> Generator[list[tuple[int, int]]]: ... @property def cells(self) -> product[tuple[int, int]]: ... def __copy__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi b/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi index 87819280d..36a98ebc8 100644 --- a/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/worksheet.pyi @@ -119,7 +119,7 @@ class Worksheet(_WorkbookChild): @overload def iter_rows( self, min_row: int | None, max_row: int | None, min_col: int | None, max_col: int | None, values_only: Literal[True] - ) -> Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_rows( self, @@ -129,7 +129,7 @@ class Worksheet(_WorkbookChild): max_col: int | None = None, *, values_only: Literal[True], - ) -> Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_rows( self, @@ -138,11 +138,11 @@ class Worksheet(_WorkbookChild): min_col: int | None = None, max_col: int | None = None, values_only: Literal[False] = False, - ) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ... + ) -> Generator[tuple[_CellOrMergedCell, ...]]: ... @overload def iter_rows( self, min_row: int | None, max_row: int | None, min_col: int | None, max_col: int | None, values_only: bool - ) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellOrMergedCell, ...]] | Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_rows( self, @@ -152,15 +152,15 @@ class Worksheet(_WorkbookChild): max_col: int | None = None, *, values_only: bool, - ) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellOrMergedCell, ...]] | Generator[tuple[_CellGetValue, ...]]: ... @property - def rows(self) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ... + def rows(self) -> Generator[tuple[_CellOrMergedCell, ...]]: ... @property def values(self) -> Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_cols( self, min_col: int | None, max_col: int | None, min_row: int | None, max_row: int | None, values_only: Literal[True] - ) -> Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_cols( self, @@ -170,7 +170,7 @@ class Worksheet(_WorkbookChild): max_row: int | None = None, *, values_only: Literal[True], - ) -> Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_cols( self, @@ -179,11 +179,11 @@ class Worksheet(_WorkbookChild): min_row: int | None = None, max_row: int | None = None, values_only: Literal[False] = False, - ) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ... + ) -> Generator[tuple[_CellOrMergedCell, ...]]: ... @overload def iter_cols( self, min_col: int | None, max_col: int | None, min_row: int | None, max_row: int | None, values_only: bool - ) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellOrMergedCell, ...]] | Generator[tuple[_CellGetValue, ...]]: ... @overload def iter_cols( self, @@ -193,9 +193,9 @@ class Worksheet(_WorkbookChild): max_row: int | None = None, *, values_only: bool, - ) -> Generator[tuple[_CellOrMergedCell, ...], None, None] | Generator[tuple[_CellGetValue, ...], None, None]: ... + ) -> Generator[tuple[_CellOrMergedCell, ...]] | Generator[tuple[_CellGetValue, ...]]: ... @property - def columns(self) -> Generator[tuple[_CellOrMergedCell, ...], None, None]: ... + def columns(self) -> Generator[tuple[_CellOrMergedCell, ...]]: ... @property def column_groups(self) -> list[str]: ... def set_printer_settings( diff --git a/stubs/peewee/peewee.pyi b/stubs/peewee/peewee.pyi index 13f5b1922..158614cd7 100644 --- a/stubs/peewee/peewee.pyi +++ b/stubs/peewee/peewee.pyi @@ -44,7 +44,7 @@ CSQ_PARENTHESES_NEVER: Final = 0 CSQ_PARENTHESES_ALWAYS: Final = 1 CSQ_PARENTHESES_UNNESTED: Final = 2 -def chunked(it, n) -> Generator[Incomplete, None, None]: ... +def chunked(it, n) -> Generator[Incomplete]: ... class _callable_context_manager: def __call__(self, fn): ... @@ -573,7 +573,7 @@ class SelectBase(_HashableSource, Source, SelectQuery): # type: ignore[misc] def peek(self, database=None, n: int = 1): ... def first(self, database=None, n: int = 1): ... def scalar(self, database=None, as_tuple: bool = False, as_dict: bool = False): ... - def scalars(self, database=None) -> Generator[Incomplete, None, None]: ... + def scalars(self, database=None) -> Generator[Incomplete]: ... def count(self, database=None, clear_limit: bool = False): ... def exists(self, database=None) -> bool: ... def get(self, database=None): ... @@ -818,7 +818,7 @@ class Database(_callable_context_manager): def begin(self) -> None: ... def commit(self) -> None: ... def rollback(self) -> None: ... - def batch_commit(self, it, n) -> Generator[Incomplete, None, None]: ... + def batch_commit(self, it, n) -> Generator[Incomplete]: ... def table_exists(self, table_name, schema: str | None = None) -> bool: ... def get_tables(self, schema: str | None = None) -> list[str]: ... def get_indexes(self, table, schema: str | None = None) -> list[IndexMetadata]: ... @@ -1057,7 +1057,7 @@ class CursorWrapper: def initialize(self) -> None: ... def iterate(self, cache: bool = True): ... def process_row(self, row): ... - def iterator(self) -> Generator[Incomplete, None, None]: ... + def iterator(self) -> Generator[Incomplete]: ... def fill_cache(self, n: int = 0) -> None: ... class DictCursorWrapper(CursorWrapper): @@ -1666,9 +1666,7 @@ class Model(metaclass=ModelBase): def dirty_fields(self) -> list[Incomplete]: ... @property def dirty_field_names(self) -> list[Incomplete]: ... - def dependencies( - self, search_nullable: bool = True, exclude_null_children: bool = False - ) -> Generator[Incomplete, None, None]: ... + def dependencies(self, search_nullable: bool = True, exclude_null_children: bool = False) -> Generator[Incomplete]: ... def delete_instance(self, recursive: bool = False, delete_nullable: bool = False): ... def __hash__(self) -> int: ... def __eq__(self, other) -> Expression | bool: ... # type: ignore[override] diff --git a/stubs/pika/pika/adapters/blocking_connection.pyi b/stubs/pika/pika/adapters/blocking_connection.pyi index 4dece0843..6832239c6 100644 --- a/stubs/pika/pika/adapters/blocking_connection.pyi +++ b/stubs/pika/pika/adapters/blocking_connection.pyi @@ -196,7 +196,7 @@ class BlockingChannel: def stop_consuming(self, consumer_tag=None) -> None: ... def consume( self, queue, auto_ack: bool = False, exclusive: bool = False, arguments=None, inactivity_timeout=None - ) -> Generator[Incomplete, None, None]: ... + ) -> Generator[Incomplete]: ... def get_waiting_message_count(self): ... def cancel(self): ... def basic_ack(self, delivery_tag: int = 0, multiple: bool = False) -> None: ... diff --git a/stubs/psutil/psutil/_pswindows.pyi b/stubs/psutil/psutil/_pswindows.pyi index 77e4728dd..d3fb630a0 100644 --- a/stubs/psutil/psutil/_pswindows.pyi +++ b/stubs/psutil/psutil/_pswindows.pyi @@ -46,12 +46,12 @@ if sys.platform == "win32": # These noqas workaround https://github.com/astral-sh/ruff/issues/10874 class Priority(enum.IntEnum): - ABOVE_NORMAL_PRIORITY_CLASS = _psutil_windows.ABOVE_NORMAL_PRIORITY_CLASS # noqa: F811 - BELOW_NORMAL_PRIORITY_CLASS = _psutil_windows.BELOW_NORMAL_PRIORITY_CLASS # noqa: F811 - HIGH_PRIORITY_CLASS = _psutil_windows.HIGH_PRIORITY_CLASS # noqa: F811 - IDLE_PRIORITY_CLASS = _psutil_windows.IDLE_PRIORITY_CLASS # noqa: F811 - NORMAL_PRIORITY_CLASS = _psutil_windows.NORMAL_PRIORITY_CLASS # noqa: F811 - REALTIME_PRIORITY_CLASS = _psutil_windows.REALTIME_PRIORITY_CLASS # noqa: F811 + ABOVE_NORMAL_PRIORITY_CLASS = _psutil_windows.ABOVE_NORMAL_PRIORITY_CLASS + BELOW_NORMAL_PRIORITY_CLASS = _psutil_windows.BELOW_NORMAL_PRIORITY_CLASS + HIGH_PRIORITY_CLASS = _psutil_windows.HIGH_PRIORITY_CLASS + IDLE_PRIORITY_CLASS = _psutil_windows.IDLE_PRIORITY_CLASS + NORMAL_PRIORITY_CLASS = _psutil_windows.NORMAL_PRIORITY_CLASS + REALTIME_PRIORITY_CLASS = _psutil_windows.REALTIME_PRIORITY_CLASS class IOPriority(enum.IntEnum): IOPRIO_VERYLOW = 0 diff --git a/stubs/pyasn1/pyasn1/codec/streaming.pyi b/stubs/pyasn1/pyasn1/codec/streaming.pyi index 1752e5cc8..b9ff83bec 100644 --- a/stubs/pyasn1/pyasn1/codec/streaming.pyi +++ b/stubs/pyasn1/pyasn1/codec/streaming.pyi @@ -16,6 +16,6 @@ class CachingStreamWrapper(io.IOBase): def tell(self): ... def asSeekableStream(substrate): ... -def isEndOfStream(substrate) -> Generator[Incomplete, None, None]: ... -def peekIntoStream(substrate, size: int = -1) -> Generator[Incomplete, None, None]: ... -def readFromStream(substrate, size: int = -1, context=None) -> Generator[Incomplete, None, None]: ... +def isEndOfStream(substrate) -> Generator[Incomplete]: ... +def peekIntoStream(substrate, size: int = -1) -> Generator[Incomplete]: ... +def readFromStream(substrate, size: int = -1, context=None) -> Generator[Incomplete]: ... diff --git a/stubs/pyasn1/pyasn1/type/namedval.pyi b/stubs/pyasn1/pyasn1/type/namedval.pyi index 20c190470..1f638b960 100644 --- a/stubs/pyasn1/pyasn1/type/namedval.pyi +++ b/stubs/pyasn1/pyasn1/type/namedval.pyi @@ -18,7 +18,7 @@ class NamedValues: def __iter__(self): ... def values(self): ... def keys(self): ... - def items(self) -> Generator[Incomplete, None, None]: ... + def items(self) -> Generator[Incomplete]: ... def __add__(self, namedValues): ... def clone(self, *args, **kwargs): ... def getName(self, value): ... diff --git a/stubs/pyasn1/pyasn1/type/univ.pyi b/stubs/pyasn1/pyasn1/type/univ.pyi index 7a7fd3c8e..ad2a65391 100644 --- a/stubs/pyasn1/pyasn1/type/univ.pyi +++ b/stubs/pyasn1/pyasn1/type/univ.pyi @@ -303,9 +303,9 @@ class SequenceAndSetBase(base.ConstructedAsn1Type): def __contains__(self, key) -> bool: ... def __len__(self) -> int: ... def __iter__(self): ... - def values(self) -> Generator[Incomplete, None, None]: ... + def values(self) -> Generator[Incomplete]: ... def keys(self): ... - def items(self) -> Generator[Incomplete, None, None]: ... + def items(self) -> Generator[Incomplete]: ... def update(self, *iterValue, **mappingValue) -> None: ... def clear(self): ... def reset(self): ... @@ -371,9 +371,9 @@ class Choice(Set): def __len__(self) -> int: ... def __contains__(self, key) -> bool: ... def __iter__(self): ... - def values(self) -> Generator[Incomplete, None, None]: ... - def keys(self) -> Generator[Incomplete, None, None]: ... - def items(self) -> Generator[Incomplete, None, None]: ... + def values(self) -> Generator[Incomplete]: ... + def keys(self) -> Generator[Incomplete]: ... + def items(self) -> Generator[Incomplete]: ... def checkConsistency(self) -> None: ... def getComponentByPosition(self, idx, default=..., instantiate: bool = True): ... def setComponentByPosition( diff --git a/stubs/pyinstaller/PyInstaller/depend/imphookapi.pyi b/stubs/pyinstaller/PyInstaller/depend/imphookapi.pyi index f8b50d403..286aac070 100644 --- a/stubs/pyinstaller/PyInstaller/depend/imphookapi.pyi +++ b/stubs/pyinstaller/PyInstaller/depend/imphookapi.pyi @@ -60,7 +60,7 @@ class PostGraphAPI: @property def node(self) -> Package: ... @property - def imports(self) -> Generator[Package, None, None]: ... + def imports(self) -> Generator[Package]: ... def add_imports(self, *module_names: str) -> None: ... def del_imports(self, *module_names: str) -> None: ... def add_binaries(self, binaries: TOC | Iterable[tuple[StrOrBytesPath, StrOrBytesPath]]) -> None: ... diff --git a/stubs/pysftp/pysftp/__init__.pyi b/stubs/pysftp/pysftp/__init__.pyi index 188e13aff..15f816429 100644 --- a/stubs/pysftp/pysftp/__init__.pyi +++ b/stubs/pysftp/pysftp/__init__.pyi @@ -76,7 +76,7 @@ class Connection: confirm: bool = True, ) -> paramiko.SFTPAttributes: ... def execute(self, command: str) -> list[str]: ... - def cd(self, remotepath: _Path | None = None) -> AbstractContextManager[None]: ... # noqa: F811 + def cd(self, remotepath: _Path | None = None) -> AbstractContextManager[None]: ... def chdir(self, remotepath: _Path) -> None: ... def cwd(self, remotepath: _Path) -> None: ... def chmod(self, remotepath: _Path, mode: int = 777) -> None: ... @@ -102,7 +102,7 @@ class Connection: def lexists(self, remotepath: _Path) -> bool: ... def symlink(self, remote_src: _Path, remote_dest: _Path) -> None: ... def truncate(self, remotepath: _Path, size: int) -> int: ... - def walktree( # noqa: F811 + def walktree( self, remotepath: _Path, fcallback: _PathCallback, diff --git a/stubs/python-crontab/cronlog.pyi b/stubs/python-crontab/cronlog.pyi index 4cde497b9..00774e321 100644 --- a/stubs/python-crontab/cronlog.pyi +++ b/stubs/python-crontab/cronlog.pyi @@ -19,7 +19,7 @@ class LogReader: self, error_type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None ) -> None: ... def __iter__(self) -> Iterator[str]: ... - def readlines(self, until: int = ...) -> Generator[tuple[int, str], None, None]: ... + def readlines(self, until: int = ...) -> Generator[tuple[int, str]]: ... def cron_date_to_datetime(cron_str: str) -> datetime: ... diff --git a/stubs/pywin32/_win32typing.pyi b/stubs/pywin32/_win32typing.pyi index e8655f335..9ba6d2246 100644 --- a/stubs/pywin32/_win32typing.pyi +++ b/stubs/pywin32/_win32typing.pyi @@ -174,12 +174,10 @@ class PyACL: def Initialize(self) -> None: ... def IsValid(self) -> bool: ... @overload - @deprecated( - """\ + @deprecated("""\ Early versions of this function supported only two arguments. \ This has been deprecated in preference of the three argument version, \ -which reflects the win32 API and the new functions in this module.""" - ) +which reflects the win32 API and the new functions in this module.""") def AddAccessAllowedAce(self, access: int, sid: PySID, /) -> None: ... @overload def AddAccessAllowedAce(self, revision: int, access: int, sid: PySID, /) -> None: ... @@ -188,12 +186,10 @@ which reflects the win32 API and the new functions in this module.""" self, AceRevision, AceFlags, AccessMask, ObjectTypeGuid: PyIID, InheritedObjectTypeGuid: PyIID, sid: PySID, / ) -> None: ... @overload - @deprecated( - """\ + @deprecated("""\ Early versions of this function supported only two arguments. \ This has been deprecated in preference of the three argument version, \ -which reflects the win32 API and the new functions in this module.""" - ) +which reflects the win32 API and the new functions in this module.""") def AddAccessDeniedAce(self, access: int, sid: PySID, /) -> None: ... @overload def AddAccessDeniedAce(self, revision: int, access: int, sid: PySID, /) -> None: ... @@ -244,13 +240,11 @@ class PyCERTSTORE: @overload def CertCloseStore(self) -> None: ... @overload - @deprecated( - """\ + @deprecated("""\ `Flags` argument has been deprecated as it is likely to crash the process if \ `CERT_CLOSE_STORE_FORCE_FLAG` is specified. The underlying function is now \ always called with `CERT_CLOSE_STORE_CHECK_FLAG`, and support for this \ -param will be dropped at some point in the future.""" - ) +param will be dropped at some point in the future.""") def CertCloseStore(self, Flags: int) -> None: ... def CertControlStore(self, Flags, CtrlType, CtrlPara: int) -> None: ... def CertEnumCertificatesInStore(self) -> list[PyCERT_CONTEXT]: ... diff --git a/stubs/pywin32/win32/win32ras.pyi b/stubs/pywin32/win32/win32ras.pyi index dd9c24536..f27777dd2 100644 --- a/stubs/pywin32/win32/win32ras.pyi +++ b/stubs/pywin32/win32/win32ras.pyi @@ -14,7 +14,7 @@ def GetConnectStatus(hrasconn, /) -> tuple[Incomplete, Incomplete, str, str]: .. def GetEntryDialParams( fileName: str, entryName: str, / ) -> tuple[tuple[Incomplete, Incomplete, Incomplete, Incomplete, Incomplete, Incomplete], bool]: ... -def GetErrorString(error, /) -> str: ... # noqa: F811 +def GetErrorString(error, /) -> str: ... def HangUp(hras, /) -> None: ... def IsHandleValid(hras: int | None, /) -> bool: ... def SetEntryDialParams(fileName: str, RasDialParams, bSavePassword, /) -> None: ... diff --git a/stubs/qrcode/qrcode/image/pure.pyi b/stubs/qrcode/qrcode/image/pure.pyi index ec5df707f..8aff0c2f8 100644 --- a/stubs/qrcode/qrcode/image/pure.pyi +++ b/stubs/qrcode/qrcode/image/pure.pyi @@ -17,7 +17,7 @@ class PyPNGImage(base.BaseImage): def get_image(self, **kwargs: Any) -> _Writer: ... def drawrect(self, row: int, col: int) -> None: ... def save(self, stream: SupportsWrite[bytes], kind: str | None = None) -> None: ... - def rows_iter(self) -> Generator[list[int], Any, None]: ... - def border_rows_iter(self) -> Generator[list[int], Any, None]: ... + def rows_iter(self) -> Generator[list[int], Any]: ... + def border_rows_iter(self) -> Generator[list[int], Any]: ... PymagingImage = PyPNGImage diff --git a/stubs/qrcode/qrcode/util.pyi b/stubs/qrcode/qrcode/util.pyi index df4832c5d..5bd10d10d 100644 --- a/stubs/qrcode/qrcode/util.pyi +++ b/stubs/qrcode/qrcode/util.pyi @@ -40,7 +40,7 @@ def mode_sizes_for_version(version: int) -> dict[_MODE, int]: ... def length_in_bits(mode: _MODE, version: int) -> int: ... def check_version(version: int) -> None: ... def lost_point(modules: list[list[bool | None]]) -> int: ... -def optimal_data_chunks(data: str | bytes, minimum: int = 4) -> Generator[QRData, None, None]: ... +def optimal_data_chunks(data: str | bytes, minimum: int = 4) -> Generator[QRData]: ... def to_bytestring(data: str | bytes) -> bytes: ... def optimal_mode(data: bytes) -> _SupportedMode: ... diff --git a/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi b/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi index 8ba0650d1..be8a719e2 100644 --- a/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi +++ b/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi @@ -197,7 +197,7 @@ class __RL_SAFE_ENV__: def __rl_range__(self, start, *args): ... def __rl_set__(self, it): ... def __rl_frozenset__(self, it=()): ... - def __rl_iter_unpack_sequence__(self, it, spec, _getiter_) -> Generator[Incomplete, None, None]: ... + def __rl_iter_unpack_sequence__(self, it, spec, _getiter_) -> Generator[Incomplete]: ... def __rl_unpack_sequence__(self, it, spec, _getiter_): ... def __rl_is_allowed_name__(self, name, crash: bool = True) -> bool: ... def __rl_getattr__(self, obj, a, *args): ... diff --git a/stubs/reportlab/reportlab/lib/utils.pyi b/stubs/reportlab/reportlab/lib/utils.pyi index 578ab1fc0..9a2371b93 100644 --- a/stubs/reportlab/reportlab/lib/utils.pyi +++ b/stubs/reportlab/reportlab/lib/utils.pyi @@ -66,7 +66,7 @@ def zipImported(ldr: zipimport.zipimporter | None = None) -> zipimport.zipimport class CIDict(dict[_KT, _VT]): def __init__(self, *args, **kwds) -> None: ... - def update(self, D: SupportsItems[_KT, _VT]) -> None: ... # type:ignore[override] + def update(self, D: SupportsItems[_KT, _VT]) -> None: ... # type: ignore[override] def markfilename(filename, creatorcode=None, filetype=None): ... @@ -198,7 +198,7 @@ class TimeStamp: def recursiveGetAttr(obj, name, g=None): ... def recursiveSetAttr(obj, name, value) -> None: ... def recursiveDelAttr(obj, name) -> None: ... -def yieldNoneSplits(L) -> Generator[Incomplete, None, None]: ... +def yieldNoneSplits(L) -> Generator[Incomplete]: ... class KlassStore: lim: int diff --git a/stubs/requests/requests/utils.pyi b/stubs/requests/requests/utils.pyi index 3edd7c103..fe6982f30 100644 --- a/stubs/requests/requests/utils.pyi +++ b/stubs/requests/requests/utils.pyi @@ -36,7 +36,7 @@ def add_dict_to_cookiejar(cj, cookie_dict): ... def get_encodings_from_content(content): ... def get_encoding_from_headers(headers: Mapping[str, str]) -> str | None: ... def stream_decode_response_unicode(iterator, r): ... -def iter_slices(string: str, slice_length: int | None) -> Generator[str, None, None]: ... +def iter_slices(string: str, slice_length: int | None) -> Generator[str]: ... def get_unicode_from_response(r): ... UNRESERVED_SET: frozenset[str] diff --git a/stubs/seaborn/seaborn/axisgrid.pyi b/stubs/seaborn/seaborn/axisgrid.pyi index 1f4072570..18e8c320d 100644 --- a/stubs/seaborn/seaborn/axisgrid.pyi +++ b/stubs/seaborn/seaborn/axisgrid.pyi @@ -236,7 +236,7 @@ class FacetGrid(Grid): subplot_kws: dict[str, Any] | None = None, gridspec_kws: dict[str, Any] | None = None, ) -> None: ... - def facet_data(self) -> Generator[tuple[tuple[int, int, int], DataFrame], None, None]: ... + def facet_data(self) -> Generator[tuple[tuple[int, int, int], DataFrame]]: ... def map(self, func: Callable[..., object], *args: str, **kwargs: Any) -> Self: ... def map_dataframe(self, func: Callable[..., object], *args: str, **kwargs: Any) -> Self: ... def facet_axis(self, row_i: int, col_j: int, modify_state: bool = True) -> Axes: ... diff --git a/stubs/setuptools/setuptools/command/test.pyi b/stubs/setuptools/setuptools/command/test.pyi index 8d7e6744c..2f7b41e5d 100644 --- a/stubs/setuptools/setuptools/command/test.pyi +++ b/stubs/setuptools/setuptools/command/test.pyi @@ -3,12 +3,10 @@ from typing_extensions import deprecated from .. import Command -@deprecated( - """\ +@deprecated("""\ The test command is disabled and references to it are deprecated. \ Please remove any references to `setuptools.command.test` in all supported versions of the affected package.\ -""" -) +""") class test(Command): description: ClassVar[str] user_options: ClassVar[list[tuple[str, str, str]]] diff --git a/stubs/setuptools/setuptools/installer.pyi b/stubs/setuptools/setuptools/installer.pyi index b53a7f6fc..8902dd66f 100644 --- a/stubs/setuptools/setuptools/installer.pyi +++ b/stubs/setuptools/setuptools/installer.pyi @@ -2,13 +2,11 @@ from importlib import metadata from typing import Any from typing_extensions import deprecated -@deprecated( - """ +@deprecated(""" `setuptools.installer` and `fetch_build_eggs` are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. - """ -) + """) def fetch_build_egg(dist, req) -> metadata.Distribution | metadata.PathDistribution: ... # Returns packaging.requirements.Requirement diff --git a/stubs/tqdm/tqdm/contrib/__init__.pyi b/stubs/tqdm/tqdm/contrib/__init__.pyi index 7023bed25..f19030989 100644 --- a/stubs/tqdm/tqdm/contrib/__init__.pyi +++ b/stubs/tqdm/tqdm/contrib/__init__.pyi @@ -11,5 +11,5 @@ class DummyTqdmFile(ObjectWrapper): def __del__(self) -> None: ... def tenumerate(iterable, start: int = 0, total=None, tqdm_class: type[Incomplete] = ..., **tqdm_kwargs): ... -def tzip(iter1, *iter2plus, **tqdm_kwargs) -> Generator[Incomplete, None, None]: ... -def tmap(function: Callable[..., Incomplete], *sequences, **tqdm_kwargs) -> Generator[Incomplete, None, None]: ... +def tzip(iter1, *iter2plus, **tqdm_kwargs) -> Generator[Incomplete]: ... +def tmap(function: Callable[..., Incomplete], *sequences, **tqdm_kwargs) -> Generator[Incomplete]: ... diff --git a/stubs/tqdm/tqdm/contrib/itertools.pyi b/stubs/tqdm/tqdm/contrib/itertools.pyi index 991181ffa..f2f9943b0 100644 --- a/stubs/tqdm/tqdm/contrib/itertools.pyi +++ b/stubs/tqdm/tqdm/contrib/itertools.pyi @@ -3,4 +3,4 @@ from collections.abc import Generator, Iterable __all__ = ["product"] -def product(*iterables: Iterable[Incomplete], **tqdm_kwargs) -> Generator[Incomplete, None, None]: ... +def product(*iterables: Iterable[Incomplete], **tqdm_kwargs) -> Generator[Incomplete]: ... diff --git a/tests/runtests.py b/tests/runtests.py index 832ade521..41fa0da67 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -186,14 +186,12 @@ def main() -> None: print("pre-commit", _SUCCESS) else: print("pre-commit", _FAILED) - print( - """\ + print("""\ Check the output of pre-commit for more details. This could mean that there's a lint failure on your code, but could also just mean that one of the pre-commit tools applied some autofixes. If the latter, you may want to check - that the autofixes did sensible things.""" - ) + that the autofixes did sensible things.""") print("Check structure:", _SUCCESS if check_structure_result.returncode == 0 else _FAILED) if pyright_skipped: print("Pyright:", _SKIPPED) diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py index d2ea4190b..17f2f2308 100755 --- a/tests/stubtest_third_party.py +++ b/tests/stubtest_third_party.py @@ -222,8 +222,7 @@ def setup_gdb_stubtest_command(venv_dir: Path, stubtest_cmd: list[str]) -> bool: gdb_script = venv_dir / "gdb_stubtest.py" wrapper_script = venv_dir / "gdb_wrapper.py" - gdb_script_contents = dedent( - f""" + gdb_script_contents = dedent(f""" import json import os import site @@ -252,12 +251,10 @@ def setup_gdb_stubtest_command(venv_dir: Path, stubtest_cmd: list[str]) -> bool: traceback.print_exc() finally: gdb.execute(f"quit {{exit_code}}") - """ - ) + """) gdb_script.write_text(gdb_script_contents) - wrapper_script_contents = dedent( - f""" + wrapper_script_contents = dedent(f""" import json import os import subprocess @@ -277,8 +274,7 @@ def setup_gdb_stubtest_command(venv_dir: Path, stubtest_cmd: list[str]) -> bool: ] r = subprocess.run(gdb_cmd, env=stubtest_env) sys.exit(r.returncode) - """ - ) + """) wrapper_script.write_text(wrapper_script_contents) # replace "-m mypy.stubtest" in stubtest_cmd with the path to our wrapper script @@ -328,8 +324,7 @@ def setup_uwsgi_stubtest_command(dist: Path, venv_dir: Path, stubtest_cmd: list[ uwsgi_script = venv_dir / "uwsgi_stubtest.py" wrapper_script = venv_dir / "uwsgi_wrapper.py" exit_code_surrogate = venv_dir / "exit_code" - uwsgi_script_contents = dedent( - f""" + uwsgi_script_contents = dedent(f""" import json import os import sys @@ -340,8 +335,7 @@ def setup_uwsgi_stubtest_command(dist: Path, venv_dir: Path, stubtest_cmd: list[ with open("{exit_code_surrogate}", mode="w") as fp: fp.write(str(exit_code)) sys.exit(exit_code) - """ - ) + """) uwsgi_script.write_text(uwsgi_script_contents) uwsgi_exe = venv_dir / "bin" / "uwsgi" @@ -351,8 +345,7 @@ def setup_uwsgi_stubtest_command(dist: Path, venv_dir: Path, stubtest_cmd: list[ # will always go to stdout and uWSGI to stderr, but on # MacOS they both go to stderr, for now we deal with the # bit of extra spam - wrapper_script_contents = dedent( - f""" + wrapper_script_contents = dedent(f""" import json import os import subprocess @@ -371,8 +364,7 @@ def setup_uwsgi_stubtest_command(dist: Path, venv_dir: Path, stubtest_cmd: list[ subprocess.run(uwsgi_cmd, env=stubtest_env) with open("{exit_code_surrogate}", mode="r") as fp: sys.exit(int(fp.read())) - """ - ) + """) wrapper_script.write_text(wrapper_script_contents) # replace "-m mypy.stubtest" in stubtest_cmd with the path to our wrapper script