mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 19:12:31 +08:00
Bump flake8-pyi to 23.11.0 (#10997)
This commit is contained in:
@@ -9,10 +9,10 @@ from .ImageFile import ImageFile
|
||||
split: Incomplete
|
||||
field: Incomplete
|
||||
if sys.platform == "win32":
|
||||
gs_binary: Literal["gswin32c", "gswin64c", "gs", False, None]
|
||||
gs_windows_binary: Literal["gswin32c", "gswin64c", "gs", False, None]
|
||||
gs_binary: Literal["gswin32c", "gswin64c", "gs", False] | None
|
||||
gs_windows_binary: Literal["gswin32c", "gswin64c", "gs", False] | None
|
||||
else:
|
||||
gs_binary: Literal["gs", False, None]
|
||||
gs_binary: Literal["gs", False] | None
|
||||
gs_windows_binary: None
|
||||
|
||||
def has_ghostscript(): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections import defaultdict
|
||||
from collections.abc import Generator, Iterable
|
||||
from collections.abc import Iterable, Iterator
|
||||
|
||||
from .encryption import StandardSecurityHandler
|
||||
from .syntax import PDFArray, PDFObject, PDFString
|
||||
@@ -45,4 +45,4 @@ class StructureTreeBuilder:
|
||||
) -> tuple[Incomplete, Incomplete]: ...
|
||||
def next_mcid_for_page(self, page_number: int) -> int: ...
|
||||
def empty(self) -> bool: ...
|
||||
def __iter__(self) -> Generator[Incomplete, None, None]: ...
|
||||
def __iter__(self) -> Iterator[Incomplete]: ...
|
||||
|
||||
@@ -32,7 +32,7 @@ TYPE_FORMULA_CACHE_STRING: Final = "str"
|
||||
|
||||
VALID_TYPES: Final[tuple[str, ...]]
|
||||
|
||||
def get_type(t: type, value: object) -> Literal["n", "s", "d", "f", None]: ...
|
||||
def get_type(t: type, value: object) -> Literal["n", "s", "d", "f"] | None: ...
|
||||
def get_time_format(t: _TimeTypes) -> str: ...
|
||||
|
||||
class Cell(StyleableObject):
|
||||
|
||||
@@ -16,7 +16,7 @@ _T = TypeVar("_T")
|
||||
|
||||
LOGGER: Incomplete
|
||||
|
||||
class ClosableDeferredQueue(DeferredQueue[_T], Generic[_T]): # pyright: ignore[reportUntypedBaseClass]
|
||||
class ClosableDeferredQueue(DeferredQueue[_T], Generic[_T]): # pyright: ignore[reportUntypedBaseClass] # noqa: Y060
|
||||
closed: Failure | BaseException | None
|
||||
def __init__(self, size: Incomplete | None = ..., backlog: Incomplete | None = ...) -> None: ...
|
||||
# Returns a Deferred with an error if fails. None if success
|
||||
|
||||
@@ -45,7 +45,7 @@ ALL_SUFFIXES: Final[list[str]]
|
||||
|
||||
architecture: Final[Literal["64bit", "n32bit", "32bit"]]
|
||||
system: Final[Literal["Cygwin", "Linux", "Darwin", "Java", "Windows"]]
|
||||
machine: Final[Literal["sw_64", "loongarch64", "arm", "intel", "ppc", "mips", "riscv", "s390x", "unknown", None]]
|
||||
machine: Final[Literal["sw_64", "loongarch64", "arm", "intel", "ppc", "mips", "riscv", "s390x", "unknown"] | None]
|
||||
|
||||
def is_wine_dll(filename: FileDescriptorOrPath) -> bool: ...
|
||||
@overload
|
||||
|
||||
@@ -66,5 +66,5 @@ class PostGraphAPI:
|
||||
def add_binaries(self, binaries: TOC | Iterable[tuple[StrOrBytesPath, StrOrBytesPath]]) -> None: ...
|
||||
def add_datas(self, datas: TOC | Iterable[tuple[StrOrBytesPath, StrOrBytesPath]]) -> None: ...
|
||||
def set_module_collection_mode(
|
||||
self, name: str | None, mode: Literal["pyz", "pyc", "py", "pyz+py", "py+pyz", None]
|
||||
self, name: str | None, mode: Literal["pyz", "pyc", "py", "pyz+py", "py+pyz"] | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -9,11 +9,11 @@ from Xlib._typing import Unused
|
||||
|
||||
if sys.platform == "darwin":
|
||||
SUPPORTED_PROTOCOLS: Final[tuple[None, Literal["tcp"], Literal["unix"], Literal["darwin"]]]
|
||||
_Protocol: TypeAlias = Literal[None, "tcp", "unix", "darwin"]
|
||||
_Protocol: TypeAlias = Literal["tcp", "unix", "darwin"] | None
|
||||
DARWIN_DISPLAY_RE: Final[Pattern[str]]
|
||||
else:
|
||||
SUPPORTED_PROTOCOLS: Final[tuple[None, Literal["tcp"], Literal["unix"]]]
|
||||
_Protocol: TypeAlias = Literal[None, "tcp", "unix"]
|
||||
_Protocol: TypeAlias = Literal["tcp", "unix"] | None
|
||||
uname: uname_result
|
||||
DISPLAY_RE: Final[Pattern[str]]
|
||||
|
||||
|
||||
@@ -238,12 +238,12 @@ class IniFile:
|
||||
list: bool = False,
|
||||
) -> None: ...
|
||||
def checkExtras(self) -> None: ...
|
||||
def checkBoolean(self, value: str) -> Literal[1, 2, None]: ...
|
||||
def checkNumber(self, value: str) -> Literal[1, 2, None]: ...
|
||||
def checkInteger(self, value: str) -> Literal[1, None]: ...
|
||||
def checkPoint(self, value: str) -> Literal[1, None]: ...
|
||||
def checkBoolean(self, value: str) -> Literal[1, 2] | None: ...
|
||||
def checkNumber(self, value: str) -> Literal[1, 2] | None: ...
|
||||
def checkInteger(self, value: str) -> Literal[1] | None: ...
|
||||
def checkPoint(self, value: str) -> Literal[1] | None: ...
|
||||
def checkString(self, value: str) -> Literal[0, 1]: ...
|
||||
def checkRegex(self, value: str) -> Literal[1, None]: ...
|
||||
def checkRegex(self, value: str) -> Literal[1] | None: ...
|
||||
def write(self, filename: str | None = None, trusted: bool = False) -> None: ...
|
||||
def set(self, key: str, value: str, group: str | None = None, locale: bool = False) -> None: ...
|
||||
def addGroup(self, group: str) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Generic, NamedTuple, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from qrcode.image.base import BaseImage
|
||||
|
||||
@@ -57,9 +57,9 @@ class QRCode(Generic[GenericImage]):
|
||||
def print_tty(self, out: Incomplete | None = None) -> None: ...
|
||||
def print_ascii(self, out: Incomplete | None = None, tty: bool = False, invert: bool = False): ...
|
||||
@overload
|
||||
def make_image(self, image_factory: Literal[None] = None, **kwargs) -> GenericImage: ...
|
||||
def make_image(self, image_factory: None = None, **kwargs) -> GenericImage: ...
|
||||
@overload
|
||||
def make_image(self, image_factory: type[GenericImageLocal] | None = None, **kwargs) -> GenericImageLocal: ...
|
||||
def make_image(self, image_factory: type[GenericImageLocal], **kwargs) -> GenericImageLocal: ...
|
||||
def is_constrained(self, row: int, col: int) -> bool: ...
|
||||
def setup_timing_pattern(self) -> None: ...
|
||||
def setup_position_adjust_pattern(self) -> None: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Iterator
|
||||
from typing import Any
|
||||
|
||||
from matplotlib.axes import Axes
|
||||
@@ -15,5 +15,5 @@ class Subplots:
|
||||
figure_kws: dict[str, Any] | None = None,
|
||||
target: Axes | Figure | SubFigure | None = None,
|
||||
) -> Figure: ...
|
||||
def __iter__(self) -> Generator[dict[str, Any], None, None]: ...
|
||||
def __iter__(self) -> Iterator[dict[str, Any]]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
@@ -3,7 +3,7 @@ import types
|
||||
import zipimport
|
||||
from _typeshed import Incomplete
|
||||
from abc import ABCMeta
|
||||
from collections.abc import Callable, Generator, Iterable, Sequence
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
|
||||
from io import BytesIO
|
||||
from re import Pattern
|
||||
from typing import IO, Any, ClassVar, Protocol, TypeVar, overload, type_check_only
|
||||
@@ -32,7 +32,7 @@ class WorkingSet:
|
||||
def iter_entry_points(self, group: str, name: str | None = None) -> Generator[EntryPoint, None, None]: ...
|
||||
def add_entry(self, entry: str) -> None: ...
|
||||
def __contains__(self, dist: Distribution) -> bool: ...
|
||||
def __iter__(self) -> Generator[Distribution, None, None]: ...
|
||||
def __iter__(self) -> Iterator[Distribution]: ...
|
||||
def find(self, req: Requirement) -> Distribution | None: ...
|
||||
def resolve(
|
||||
self,
|
||||
@@ -61,7 +61,7 @@ class Environment:
|
||||
self, search_path: Sequence[str] | None = None, platform: str | None = ..., python: str | None = ...
|
||||
) -> None: ...
|
||||
def __getitem__(self, project_name: str) -> list[Distribution]: ...
|
||||
def __iter__(self) -> Generator[str, None, None]: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def add(self, dist: Distribution) -> None: ...
|
||||
def remove(self, dist: Distribution) -> None: ...
|
||||
def can_add(self, dist: Distribution) -> bool: ...
|
||||
|
||||
@@ -38,7 +38,7 @@ class InputSpec:
|
||||
|
||||
# Most layers have input and output type of just Tensor and when we support default type variables,
|
||||
# maybe worth trying.
|
||||
class Layer(Generic[_InputT, _OutputT], tf.Module):
|
||||
class Layer(tf.Module, Generic[_InputT, _OutputT]):
|
||||
# The most general type is _ContainerGeneric[InputSpec] as it really
|
||||
# depends on _InputT. For most Layers it is just InputSpec
|
||||
# though. Maybe describable with HKT?
|
||||
|
||||
Reference in New Issue
Block a user