mirror of https://github.com/astral-sh/ruff
Sync vendored typeshed stubs (#13578)
Close and reopen this PR to trigger CI Co-authored-by: typeshedbot <>
This commit is contained in:
parent
3af3f74c66
commit
360af1bc32
|
|
@ -1 +1 @@
|
||||||
9e506eb5e8fc2823db8c60ad561b1145ff114947
|
91a58b07cdd807b1d965e04ba85af2adab8bf924
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,8 @@ importlib.metadata._meta: 3.10-
|
||||||
importlib.metadata.diagnose: 3.13-
|
importlib.metadata.diagnose: 3.13-
|
||||||
importlib.readers: 3.10-
|
importlib.readers: 3.10-
|
||||||
importlib.resources: 3.7-
|
importlib.resources: 3.7-
|
||||||
|
importlib.resources._common: 3.11-
|
||||||
|
importlib.resources._functional: 3.13-
|
||||||
importlib.resources.abc: 3.11-
|
importlib.resources.abc: 3.11-
|
||||||
importlib.resources.readers: 3.11-
|
importlib.resources.readers: 3.11-
|
||||||
importlib.resources.simple: 3.11-
|
importlib.resources.simple: 3.11-
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import _lsprof
|
import _lsprof
|
||||||
from _typeshed import StrOrBytesPath, Unused
|
from _typeshed import StrOrBytesPath, Unused
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable, Mapping
|
||||||
from types import CodeType
|
from types import CodeType
|
||||||
from typing import Any, TypeVar
|
from typing import Any, TypeVar
|
||||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||||
|
|
@ -9,7 +9,7 @@ __all__ = ["run", "runctx", "Profile"]
|
||||||
|
|
||||||
def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ...
|
def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ...
|
||||||
def runctx(
|
def runctx(
|
||||||
statement: str, globals: dict[str, Any], locals: dict[str, Any], filename: str | None = None, sort: str | int = -1
|
statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None = None, sort: str | int = -1
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|
||||||
_T = TypeVar("_T")
|
_T = TypeVar("_T")
|
||||||
|
|
@ -23,7 +23,7 @@ class Profile(_lsprof.Profiler):
|
||||||
def create_stats(self) -> None: ...
|
def create_stats(self) -> None: ...
|
||||||
def snapshot_stats(self) -> None: ...
|
def snapshot_stats(self) -> None: ...
|
||||||
def run(self, cmd: str) -> Self: ...
|
def run(self, cmd: str) -> Self: ...
|
||||||
def runctx(self, cmd: str, globals: dict[str, Any], locals: dict[str, Any]) -> Self: ...
|
def runctx(self, cmd: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> Self: ...
|
||||||
def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ...
|
def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ...
|
||||||
def __enter__(self) -> Self: ...
|
def __enter__(self) -> Self: ...
|
||||||
def __exit__(self, *exc_info: Unused) -> None: ...
|
def __exit__(self, *exc_info: Unused) -> None: ...
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,9 @@ class Calendar:
|
||||||
def monthdatescalendar(self, year: int, month: int) -> list[list[datetime.date]]: ...
|
def monthdatescalendar(self, year: int, month: int) -> list[list[datetime.date]]: ...
|
||||||
def monthdays2calendar(self, year: int, month: int) -> list[list[tuple[int, int]]]: ...
|
def monthdays2calendar(self, year: int, month: int) -> list[list[tuple[int, int]]]: ...
|
||||||
def monthdayscalendar(self, year: int, month: int) -> list[list[int]]: ...
|
def monthdayscalendar(self, year: int, month: int) -> list[list[int]]: ...
|
||||||
def yeardatescalendar(self, year: int, width: int = 3) -> list[list[int]]: ...
|
def yeardatescalendar(self, year: int, width: int = 3) -> list[list[list[list[datetime.date]]]]: ...
|
||||||
def yeardays2calendar(self, year: int, width: int = 3) -> list[list[tuple[int, int]]]: ...
|
def yeardays2calendar(self, year: int, width: int = 3) -> list[list[list[list[tuple[int, int]]]]]: ...
|
||||||
def yeardayscalendar(self, year: int, width: int = 3) -> list[list[int]]: ...
|
def yeardayscalendar(self, year: int, width: int = 3) -> list[list[list[list[int]]]]: ...
|
||||||
def itermonthdays3(self, year: int, month: int) -> Iterable[tuple[int, int, int]]: ...
|
def itermonthdays3(self, year: int, month: int) -> Iterable[tuple[int, int, int]]: ...
|
||||||
def itermonthdays4(self, year: int, month: int) -> Iterable[tuple[int, int, int, int]]: ...
|
def itermonthdays4(self, year: int, month: int) -> Iterable[tuple[int, int, int, int]]: ...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,10 +145,10 @@ if sys.version_info >= (3, 9):
|
||||||
# which is not the case.
|
# which is not the case.
|
||||||
@overload
|
@overload
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def open(self, mode: Literal["r"] = "r", /, *, encoding: str | None = None, errors: str | None = None) -> IO[str]: ...
|
def open(self, mode: Literal["r"] = "r", *, encoding: str | None = None, errors: str | None = None) -> IO[str]: ...
|
||||||
@overload
|
@overload
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def open(self, mode: Literal["rb"], /) -> IO[bytes]: ...
|
def open(self, mode: Literal["rb"]) -> IO[bytes]: ...
|
||||||
@property
|
@property
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def name(self) -> str: ...
|
def name(self) -> str: ...
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,15 @@ from types import ModuleType
|
||||||
from typing import Any, BinaryIO, TextIO
|
from typing import Any, BinaryIO, TextIO
|
||||||
from typing_extensions import TypeAlias
|
from typing_extensions import TypeAlias
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 11):
|
||||||
|
from importlib.resources._common import Package as Package
|
||||||
|
else:
|
||||||
|
Package: TypeAlias = str | ModuleType
|
||||||
|
|
||||||
if sys.version_info >= (3, 9):
|
if sys.version_info >= (3, 9):
|
||||||
from importlib.abc import Traversable
|
from importlib.abc import Traversable
|
||||||
|
|
||||||
__all__ = ["Package", "Resource", "contents", "is_resource", "open_binary", "open_text", "path", "read_binary", "read_text"]
|
__all__ = ["Package", "contents", "is_resource", "open_binary", "open_text", "path", "read_binary", "read_text"]
|
||||||
|
|
||||||
if sys.version_info >= (3, 9):
|
if sys.version_info >= (3, 9):
|
||||||
__all__ += ["as_file", "files"]
|
__all__ += ["as_file", "files"]
|
||||||
|
|
@ -18,13 +23,30 @@ if sys.version_info >= (3, 9):
|
||||||
if sys.version_info >= (3, 10):
|
if sys.version_info >= (3, 10):
|
||||||
__all__ += ["ResourceReader"]
|
__all__ += ["ResourceReader"]
|
||||||
|
|
||||||
Package: TypeAlias = str | ModuleType
|
if sys.version_info < (3, 13):
|
||||||
|
__all__ += ["Resource"]
|
||||||
|
|
||||||
if sys.version_info >= (3, 11):
|
if sys.version_info < (3, 11):
|
||||||
Resource: TypeAlias = str
|
|
||||||
else:
|
|
||||||
Resource: TypeAlias = str | os.PathLike[Any]
|
Resource: TypeAlias = str | os.PathLike[Any]
|
||||||
|
elif sys.version_info < (3, 13):
|
||||||
|
Resource: TypeAlias = str
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 13):
|
||||||
|
from importlib.resources._common import Anchor as Anchor
|
||||||
|
|
||||||
|
__all__ += ["Anchor"]
|
||||||
|
|
||||||
|
from importlib.resources._functional import (
|
||||||
|
contents as contents,
|
||||||
|
is_resource as is_resource,
|
||||||
|
open_binary as open_binary,
|
||||||
|
open_text as open_text,
|
||||||
|
path as path,
|
||||||
|
read_binary as read_binary,
|
||||||
|
read_text as read_text,
|
||||||
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
def open_binary(package: Package, resource: Resource) -> BinaryIO: ...
|
def open_binary(package: Package, resource: Resource) -> BinaryIO: ...
|
||||||
def open_text(package: Package, resource: Resource, encoding: str = "utf-8", errors: str = "strict") -> TextIO: ...
|
def open_text(package: Package, resource: Resource, encoding: str = "utf-8", errors: str = "strict") -> TextIO: ...
|
||||||
def read_binary(package: Package, resource: Resource) -> bytes: ...
|
def read_binary(package: Package, resource: Resource) -> bytes: ...
|
||||||
|
|
@ -33,11 +55,13 @@ def path(package: Package, resource: Resource) -> AbstractContextManager[Path]:
|
||||||
def is_resource(package: Package, name: str) -> bool: ...
|
def is_resource(package: Package, name: str) -> bool: ...
|
||||||
def contents(package: Package) -> Iterator[str]: ...
|
def contents(package: Package) -> Iterator[str]: ...
|
||||||
|
|
||||||
if sys.version_info >= (3, 9):
|
if sys.version_info >= (3, 11):
|
||||||
|
from importlib.resources._common import as_file as as_file
|
||||||
|
elif sys.version_info >= (3, 9):
|
||||||
def as_file(path: Traversable) -> AbstractContextManager[Path]: ...
|
def as_file(path: Traversable) -> AbstractContextManager[Path]: ...
|
||||||
|
|
||||||
if sys.version_info >= (3, 12):
|
if sys.version_info >= (3, 11):
|
||||||
def files(anchor: Package | None = ...) -> Traversable: ...
|
from importlib.resources._common import files as files
|
||||||
|
|
||||||
elif sys.version_info >= (3, 9):
|
elif sys.version_info >= (3, 9):
|
||||||
def files(package: Package) -> Traversable: ...
|
def files(package: Package) -> Traversable: ...
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Even though this file is 3.11+ only, Pyright will complain in stubtest for older versions.
|
||||||
|
if sys.version_info >= (3, 11):
|
||||||
|
import types
|
||||||
|
from collections.abc import Callable
|
||||||
|
from contextlib import AbstractContextManager
|
||||||
|
from importlib.abc import ResourceReader, Traversable
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import overload
|
||||||
|
from typing_extensions import TypeAlias, deprecated
|
||||||
|
|
||||||
|
Package: TypeAlias = str | types.ModuleType
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 12):
|
||||||
|
Anchor: TypeAlias = Package
|
||||||
|
|
||||||
|
def package_to_anchor(
|
||||||
|
func: Callable[[Anchor | None], Traversable]
|
||||||
|
) -> Callable[[Anchor | None, Anchor | None], Traversable]: ...
|
||||||
|
@overload
|
||||||
|
def files(anchor: Anchor | None = None) -> Traversable: ...
|
||||||
|
@overload
|
||||||
|
@deprecated("First parameter to files is renamed to 'anchor'")
|
||||||
|
def files(package: Anchor | None = None) -> Traversable: ...
|
||||||
|
|
||||||
|
else:
|
||||||
|
def files(package: Package) -> Traversable: ...
|
||||||
|
|
||||||
|
def get_resource_reader(package: types.ModuleType) -> ResourceReader | None: ...
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 12):
|
||||||
|
def resolve(cand: Anchor | None) -> types.ModuleType: ...
|
||||||
|
|
||||||
|
else:
|
||||||
|
def resolve(cand: Package) -> types.ModuleType: ...
|
||||||
|
|
||||||
|
if sys.version_info < (3, 12):
|
||||||
|
def get_package(package: Package) -> types.ModuleType: ...
|
||||||
|
|
||||||
|
def from_package(package: types.ModuleType) -> Traversable: ...
|
||||||
|
def as_file(path: Traversable) -> AbstractContextManager[Path]: ...
|
||||||
30
crates/ruff_vendored/vendor/typeshed/stdlib/importlib/resources/_functional.pyi
vendored
Normal file
30
crates/ruff_vendored/vendor/typeshed/stdlib/importlib/resources/_functional.pyi
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Even though this file is 3.13+ only, Pyright will complain in stubtest for older versions.
|
||||||
|
if sys.version_info >= (3, 13):
|
||||||
|
from _typeshed import StrPath
|
||||||
|
from collections.abc import Iterator
|
||||||
|
from contextlib import AbstractContextManager
|
||||||
|
from importlib.resources._common import Anchor
|
||||||
|
from io import TextIOWrapper
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import BinaryIO, overload
|
||||||
|
from typing_extensions import Unpack
|
||||||
|
|
||||||
|
def open_binary(anchor: Anchor, *path_names: StrPath) -> BinaryIO: ...
|
||||||
|
@overload
|
||||||
|
def open_text(
|
||||||
|
anchor: Anchor, *path_names: Unpack[tuple[StrPath]], encoding: str | None = "utf-8", errors: str | None = "strict"
|
||||||
|
) -> TextIOWrapper: ...
|
||||||
|
@overload
|
||||||
|
def open_text(anchor: Anchor, *path_names: StrPath, encoding: str | None, errors: str | None = "strict") -> TextIOWrapper: ...
|
||||||
|
def read_binary(anchor: Anchor, *path_names: StrPath) -> bytes: ...
|
||||||
|
@overload
|
||||||
|
def read_text(
|
||||||
|
anchor: Anchor, *path_names: Unpack[tuple[StrPath]], encoding: str | None = "utf-8", errors: str | None = "strict"
|
||||||
|
) -> str: ...
|
||||||
|
@overload
|
||||||
|
def read_text(anchor: Anchor, *path_names: StrPath, encoding: str | None, errors: str | None = "strict") -> str: ...
|
||||||
|
def path(anchor: Anchor, *path_names: StrPath) -> AbstractContextManager[Path]: ...
|
||||||
|
def is_resource(anchor: Anchor, *path_names: StrPath) -> bool: ...
|
||||||
|
def contents(anchor: Anchor, *path_names: StrPath) -> Iterator[str]: ...
|
||||||
|
|
@ -107,5 +107,7 @@ if sys.platform == "win32":
|
||||||
listvolumes as listvolumes,
|
listvolumes as listvolumes,
|
||||||
set_blocking as set_blocking,
|
set_blocking as set_blocking,
|
||||||
)
|
)
|
||||||
|
if sys.version_info >= (3, 13):
|
||||||
|
from os import fchmod as fchmod, lchmod as lchmod
|
||||||
|
|
||||||
environ: dict[str, str]
|
environ: dict[str, str]
|
||||||
|
|
|
||||||
|
|
@ -673,7 +673,6 @@ if sys.version_info >= (3, 12) or sys.platform != "win32":
|
||||||
def set_blocking(fd: int, blocking: bool, /) -> None: ...
|
def set_blocking(fd: int, blocking: bool, /) -> None: ...
|
||||||
|
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
def fchmod(fd: int, mode: int) -> None: ...
|
|
||||||
def fchown(fd: int, uid: int, gid: int) -> None: ...
|
def fchown(fd: int, uid: int, gid: int) -> None: ...
|
||||||
def fpathconf(fd: int, name: str | int, /) -> int: ...
|
def fpathconf(fd: int, name: str | int, /) -> int: ...
|
||||||
def fstatvfs(fd: int, /) -> statvfs_result: ...
|
def fstatvfs(fd: int, /) -> statvfs_result: ...
|
||||||
|
|
@ -754,7 +753,6 @@ def chmod(path: FileDescriptorOrPath, mode: int, *, dir_fd: int | None = None, f
|
||||||
if sys.platform != "win32" and sys.platform != "linux":
|
if sys.platform != "win32" and sys.platform != "linux":
|
||||||
def chflags(path: StrOrBytesPath, flags: int, follow_symlinks: bool = True) -> None: ... # some flavors of Unix
|
def chflags(path: StrOrBytesPath, flags: int, follow_symlinks: bool = True) -> None: ... # some flavors of Unix
|
||||||
def lchflags(path: StrOrBytesPath, flags: int) -> None: ...
|
def lchflags(path: StrOrBytesPath, flags: int) -> None: ...
|
||||||
def lchmod(path: StrOrBytesPath, mode: int) -> None: ...
|
|
||||||
|
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
def chroot(path: StrOrBytesPath) -> None: ...
|
def chroot(path: StrOrBytesPath) -> None: ...
|
||||||
|
|
@ -1179,3 +1177,12 @@ if sys.version_info >= (3, 13) and sys.platform == "linux":
|
||||||
def timerfd_settime_ns(fd: FileDescriptor, /, *, flags: int = 0, initial: int = 0, interval: int = 0) -> tuple[int, int]: ...
|
def timerfd_settime_ns(fd: FileDescriptor, /, *, flags: int = 0, initial: int = 0, interval: int = 0) -> tuple[int, int]: ...
|
||||||
def timerfd_gettime(fd: FileDescriptor, /) -> tuple[float, float]: ...
|
def timerfd_gettime(fd: FileDescriptor, /) -> tuple[float, float]: ...
|
||||||
def timerfd_gettime_ns(fd: FileDescriptor, /) -> tuple[int, int]: ...
|
def timerfd_gettime_ns(fd: FileDescriptor, /) -> tuple[int, int]: ...
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 13) or sys.platform != "win32":
|
||||||
|
# Added to Windows in 3.13.
|
||||||
|
def fchmod(fd: int, mode: int) -> None: ...
|
||||||
|
|
||||||
|
if sys.platform != "linux":
|
||||||
|
if sys.version_info >= (3, 13) or sys.platform != "win32":
|
||||||
|
# Added to Windows in 3.13.
|
||||||
|
def lchmod(path: StrOrBytesPath, mode: int) -> None: ...
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from _typeshed import StrOrBytesPath
|
from _typeshed import StrOrBytesPath
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable, Mapping
|
||||||
from typing import Any, TypeVar
|
from typing import Any, TypeVar
|
||||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ __all__ = ["run", "runctx", "Profile"]
|
||||||
|
|
||||||
def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ...
|
def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ...
|
||||||
def runctx(
|
def runctx(
|
||||||
statement: str, globals: dict[str, Any], locals: dict[str, Any], filename: str | None = None, sort: str | int = -1
|
statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None = None, sort: str | int = -1
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|
||||||
_T = TypeVar("_T")
|
_T = TypeVar("_T")
|
||||||
|
|
@ -26,6 +26,6 @@ class Profile:
|
||||||
def create_stats(self) -> None: ...
|
def create_stats(self) -> None: ...
|
||||||
def snapshot_stats(self) -> None: ...
|
def snapshot_stats(self) -> None: ...
|
||||||
def run(self, cmd: str) -> Self: ...
|
def run(self, cmd: str) -> Self: ...
|
||||||
def runctx(self, cmd: str, globals: dict[str, Any], locals: dict[str, Any]) -> Self: ...
|
def runctx(self, cmd: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> Self: ...
|
||||||
def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ...
|
def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ...
|
||||||
def calibrate(self, m: int, verbose: int = 0) -> float: ...
|
def calibrate(self, m: int, verbose: int = 0) -> float: ...
|
||||||
|
|
|
||||||
|
|
@ -3025,10 +3025,115 @@ class Text(Widget, XView, YView):
|
||||||
config = configure
|
config = configure
|
||||||
def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore[override]
|
def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore[override]
|
||||||
def compare(self, index1: _TextIndex, op: Literal["<", "<=", "==", ">=", ">", "!="], index2: _TextIndex) -> bool: ...
|
def compare(self, index1: _TextIndex, op: Literal["<", "<=", "==", ">=", ">", "!="], index2: _TextIndex) -> bool: ...
|
||||||
|
if sys.version_info >= (3, 13):
|
||||||
|
@overload
|
||||||
|
def count(self, index1: _TextIndex, index2: _TextIndex, *, return_ints: Literal[True]) -> int: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self, index1: _TextIndex, index2: _TextIndex, arg: _WhatToCount | Literal["update"], /, *, return_ints: Literal[True]
|
||||||
|
) -> int: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: Literal["update"],
|
||||||
|
arg2: _WhatToCount,
|
||||||
|
/,
|
||||||
|
*,
|
||||||
|
return_ints: Literal[True],
|
||||||
|
) -> int: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: _WhatToCount,
|
||||||
|
arg2: Literal["update"],
|
||||||
|
/,
|
||||||
|
*,
|
||||||
|
return_ints: Literal[True],
|
||||||
|
) -> int: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self, index1: _TextIndex, index2: _TextIndex, arg1: _WhatToCount, arg2: _WhatToCount, /, *, return_ints: Literal[True]
|
||||||
|
) -> tuple[int, int]: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: _WhatToCount | Literal["update"],
|
||||||
|
arg2: _WhatToCount | Literal["update"],
|
||||||
|
arg3: _WhatToCount | Literal["update"],
|
||||||
|
/,
|
||||||
|
*args: _WhatToCount | Literal["update"],
|
||||||
|
return_ints: Literal[True],
|
||||||
|
) -> tuple[int, ...]: ...
|
||||||
|
@overload
|
||||||
|
def count(self, index1: _TextIndex, index2: _TextIndex, *, return_ints: Literal[False] = False) -> tuple[int] | None: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg: _WhatToCount | Literal["update"],
|
||||||
|
/,
|
||||||
|
*,
|
||||||
|
return_ints: Literal[False] = False,
|
||||||
|
) -> tuple[int] | None: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: Literal["update"],
|
||||||
|
arg2: _WhatToCount,
|
||||||
|
/,
|
||||||
|
*,
|
||||||
|
return_ints: Literal[False] = False,
|
||||||
|
) -> int | None: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: _WhatToCount,
|
||||||
|
arg2: Literal["update"],
|
||||||
|
/,
|
||||||
|
*,
|
||||||
|
return_ints: Literal[False] = False,
|
||||||
|
) -> int | None: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: _WhatToCount,
|
||||||
|
arg2: _WhatToCount,
|
||||||
|
/,
|
||||||
|
*,
|
||||||
|
return_ints: Literal[False] = False,
|
||||||
|
) -> tuple[int, int]: ...
|
||||||
|
@overload
|
||||||
|
def count(
|
||||||
|
self,
|
||||||
|
index1: _TextIndex,
|
||||||
|
index2: _TextIndex,
|
||||||
|
arg1: _WhatToCount | Literal["update"],
|
||||||
|
arg2: _WhatToCount | Literal["update"],
|
||||||
|
arg3: _WhatToCount | Literal["update"],
|
||||||
|
/,
|
||||||
|
*args: _WhatToCount | Literal["update"],
|
||||||
|
return_ints: Literal[False] = False,
|
||||||
|
) -> tuple[int, ...]: ...
|
||||||
|
else:
|
||||||
@overload
|
@overload
|
||||||
def count(self, index1: _TextIndex, index2: _TextIndex) -> tuple[int] | None: ...
|
def count(self, index1: _TextIndex, index2: _TextIndex) -> tuple[int] | None: ...
|
||||||
@overload
|
@overload
|
||||||
def count(self, index1: _TextIndex, index2: _TextIndex, arg: _WhatToCount | Literal["update"], /) -> tuple[int] | None: ...
|
def count(
|
||||||
|
self, index1: _TextIndex, index2: _TextIndex, arg: _WhatToCount | Literal["update"], /
|
||||||
|
) -> tuple[int] | None: ...
|
||||||
@overload
|
@overload
|
||||||
def count(self, index1: _TextIndex, index2: _TextIndex, arg1: Literal["update"], arg2: _WhatToCount, /) -> int | None: ...
|
def count(self, index1: _TextIndex, index2: _TextIndex, arg1: Literal["update"], arg2: _WhatToCount, /) -> int | None: ...
|
||||||
@overload
|
@overload
|
||||||
|
|
@ -3046,6 +3151,7 @@ class Text(Widget, XView, YView):
|
||||||
/,
|
/,
|
||||||
*args: _WhatToCount | Literal["update"],
|
*args: _WhatToCount | Literal["update"],
|
||||||
) -> tuple[int, ...]: ...
|
) -> tuple[int, ...]: ...
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def debug(self, boolean: None = None) -> bool: ...
|
def debug(self, boolean: None = None) -> bool: ...
|
||||||
@overload
|
@overload
|
||||||
|
|
|
||||||
|
|
@ -540,7 +540,7 @@ class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]):
|
||||||
def __aiter__(self) -> AsyncIterator[_T_co]: ...
|
def __aiter__(self) -> AsyncIterator[_T_co]: ...
|
||||||
|
|
||||||
class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra]):
|
class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra]):
|
||||||
def __anext__(self) -> Awaitable[_YieldT_co]: ...
|
def __anext__(self) -> Coroutine[Any, Any, _YieldT_co]: ...
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def asend(self, value: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]: ...
|
def asend(self, value: _SendT_contra, /) -> Coroutine[Any, Any, _YieldT_co]: ...
|
||||||
@overload
|
@overload
|
||||||
|
|
@ -861,13 +861,13 @@ if sys.version_info >= (3, 9):
|
||||||
def get_type_hints(
|
def get_type_hints(
|
||||||
obj: _get_type_hints_obj_allowed_types,
|
obj: _get_type_hints_obj_allowed_types,
|
||||||
globalns: dict[str, Any] | None = None,
|
globalns: dict[str, Any] | None = None,
|
||||||
localns: dict[str, Any] | None = None,
|
localns: Mapping[str, Any] | None = None,
|
||||||
include_extras: bool = False,
|
include_extras: bool = False,
|
||||||
) -> dict[str, Any]: ...
|
) -> dict[str, Any]: ...
|
||||||
|
|
||||||
else:
|
else:
|
||||||
def get_type_hints(
|
def get_type_hints(
|
||||||
obj: _get_type_hints_obj_allowed_types, globalns: dict[str, Any] | None = None, localns: dict[str, Any] | None = None
|
obj: _get_type_hints_obj_allowed_types, globalns: dict[str, Any] | None = None, localns: Mapping[str, Any] | None = None
|
||||||
) -> dict[str, Any]: ...
|
) -> dict[str, Any]: ...
|
||||||
|
|
||||||
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
||||||
|
|
@ -995,13 +995,13 @@ class ForwardRef:
|
||||||
"that references a PEP 695 type parameter. It will be disallowed in Python 3.15."
|
"that references a PEP 695 type parameter. It will be disallowed in Python 3.15."
|
||||||
)
|
)
|
||||||
def _evaluate(
|
def _evaluate(
|
||||||
self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None, *, recursive_guard: frozenset[str]
|
self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None, *, recursive_guard: frozenset[str]
|
||||||
) -> Any | None: ...
|
) -> Any | None: ...
|
||||||
@overload
|
@overload
|
||||||
def _evaluate(
|
def _evaluate(
|
||||||
self,
|
self,
|
||||||
globalns: dict[str, Any] | None,
|
globalns: dict[str, Any] | None,
|
||||||
localns: dict[str, Any] | None,
|
localns: Mapping[str, Any] | None,
|
||||||
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...],
|
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...],
|
||||||
*,
|
*,
|
||||||
recursive_guard: frozenset[str],
|
recursive_guard: frozenset[str],
|
||||||
|
|
@ -1010,17 +1010,17 @@ class ForwardRef:
|
||||||
def _evaluate(
|
def _evaluate(
|
||||||
self,
|
self,
|
||||||
globalns: dict[str, Any] | None,
|
globalns: dict[str, Any] | None,
|
||||||
localns: dict[str, Any] | None,
|
localns: Mapping[str, Any] | None,
|
||||||
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
|
type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None,
|
||||||
*,
|
*,
|
||||||
recursive_guard: frozenset[str],
|
recursive_guard: frozenset[str],
|
||||||
) -> Any | None: ...
|
) -> Any | None: ...
|
||||||
elif sys.version_info >= (3, 9):
|
elif sys.version_info >= (3, 9):
|
||||||
def _evaluate(
|
def _evaluate(
|
||||||
self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None, recursive_guard: frozenset[str]
|
self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None, recursive_guard: frozenset[str]
|
||||||
) -> Any | None: ...
|
) -> Any | None: ...
|
||||||
else:
|
else:
|
||||||
def _evaluate(self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None) -> Any | None: ...
|
def _evaluate(self, globalns: dict[str, Any] | None, localns: Mapping[str, Any] | None) -> Any | None: ...
|
||||||
|
|
||||||
def __eq__(self, other: object) -> bool: ...
|
def __eq__(self, other: object) -> bool: ...
|
||||||
def __hash__(self) -> int: ...
|
def __hash__(self) -> int: ...
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ OrderedDict = _Alias()
|
||||||
def get_type_hints(
|
def get_type_hints(
|
||||||
obj: Callable[..., Any],
|
obj: Callable[..., Any],
|
||||||
globalns: dict[str, Any] | None = None,
|
globalns: dict[str, Any] | None = None,
|
||||||
localns: dict[str, Any] | None = None,
|
localns: Mapping[str, Any] | None = None,
|
||||||
include_extras: bool = False,
|
include_extras: bool = False,
|
||||||
) -> dict[str, Any]: ...
|
) -> dict[str, Any]: ...
|
||||||
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue