Update most test/lint dependencies (#15582)

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

Some files were not shown because too many files have changed in this diff Show More