diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c3bcea9a..bdff1e123 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: additional_dependencies: - "flake8-bugbear==23.1.14" # must match requirements-tests.txt - "flake8-noqa==1.3.0" # must match requirements-tests.txt - - "flake8-pyi==23.1.0" # must match requirements-tests.txt + - "flake8-pyi==23.1.1" # must match requirements-tests.txt - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.0.0-alpha.4 python_requirement: false diff --git a/requirements-tests.txt b/requirements-tests.txt index 0a77cf0bc..a6ff6172f 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -3,7 +3,7 @@ black==22.12.0 # must match .pre-commit-confi flake8==6.0.0; python_version >= "3.8" # must match .pre-commit-config.yaml flake8-bugbear==23.1.14; python_version >= "3.8" # must match .pre-commit-config.yaml flake8-noqa==1.3.0; python_version >= "3.8" # must match .pre-commit-config.yaml -flake8-pyi==23.1.0; python_version >= "3.8" # must match .pre-commit-config.yaml +flake8-pyi==23.1.1; python_version >= "3.8" # must match .pre-commit-config.yaml isort==5.11.4 # must match .pre-commit-config.yaml mypy==0.991 packaging==23.0 diff --git a/stdlib/collections/__init__.pyi b/stdlib/collections/__init__.pyi index 63380af3f..dde0f535b 100644 --- a/stdlib/collections/__init__.pyi +++ b/stdlib/collections/__init__.pyi @@ -163,18 +163,18 @@ class UserString(Sequence[UserString]): def capitalize(self: Self) -> Self: ... def casefold(self: Self) -> Self: ... def center(self: Self, width: int, *args: Any) -> Self: ... - def count(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ... + def count(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ... if sys.version_info >= (3, 8): def encode(self: UserString, encoding: str | None = "utf-8", errors: str | None = "strict") -> bytes: ... else: def encode(self: Self, encoding: str | None = ..., errors: str | None = ...) -> Self: ... - def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = ...) -> bool: ... + def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool: ... def expandtabs(self: Self, tabsize: int = 8) -> Self: ... - def find(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ... + def find(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ... def format(self, *args: Any, **kwds: Any) -> str: ... def format_map(self, mapping: Mapping[str, Any]) -> str: ... - def index(self, sub: str, start: int = 0, end: int = ...) -> int: ... + def index(self, sub: str, start: int = 0, end: int = sys.maxsize) -> int: ... def isalpha(self) -> bool: ... def isalnum(self) -> bool: ... def isdecimal(self) -> bool: ... @@ -203,15 +203,15 @@ class UserString(Sequence[UserString]): def removesuffix(self: Self, __suffix: str | UserString) -> Self: ... def replace(self: Self, old: str | UserString, new: str | UserString, maxsplit: int = -1) -> Self: ... - def rfind(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ... - def rindex(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ... + def rfind(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ... + def rindex(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ... def rjust(self: Self, width: int, *args: Any) -> Self: ... def rpartition(self, sep: str) -> tuple[str, str, str]: ... def rstrip(self: Self, chars: str | None = None) -> Self: ... def split(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ... def rsplit(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ... def splitlines(self, keepends: bool = False) -> list[str]: ... - def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = ...) -> bool: ... + def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool: ... def strip(self: Self, chars: str | None = None) -> Self: ... def swapcase(self: Self) -> Self: ... def title(self: Self) -> Self: ... diff --git a/stdlib/lib2to3/pytree.pyi b/stdlib/lib2to3/pytree.pyi index cb56d20f6..ff3ac1a4d 100644 --- a/stdlib/lib2to3/pytree.pyi +++ b/stdlib/lib2to3/pytree.pyi @@ -83,7 +83,7 @@ class NodePattern(BasePattern): class WildcardPattern(BasePattern): min: int max: int - def __init__(self, content: str | None = None, min: int = 0, max: int = 2147483647, name: str | None = None) -> None: ... + def __init__(self, content: str | None = None, min: int = 0, max: int = ..., name: str | None = None) -> None: ... class NegatedPattern(BasePattern): def __init__(self, content: str | None = None) -> None: ... diff --git a/stdlib/platform.pyi b/stdlib/platform.pyi index c683ba596..2bc52909e 100644 --- a/stdlib/platform.pyi +++ b/stdlib/platform.pyi @@ -37,7 +37,7 @@ def java_ver( release: str = "", vendor: str = "", vminfo: tuple[str, str, str] = ..., osinfo: tuple[str, str, str] = ... ) -> tuple[str, str, tuple[str, str, str], tuple[str, str, str]]: ... def system_alias(system: str, release: str, version: str) -> tuple[str, str, str]: ... -def architecture(executable: str = ..., bits: str = "", linkage: str = "") -> tuple[str, str]: ... +def architecture(executable: str = sys.executable, bits: str = "", linkage: str = "") -> tuple[str, str]: ... class uname_result(NamedTuple): system: str diff --git a/stdlib/smtpd.pyi b/stdlib/smtpd.pyi index 7392bd516..a83e827bf 100644 --- a/stdlib/smtpd.pyi +++ b/stdlib/smtpd.pyi @@ -41,7 +41,7 @@ class SMTPChannel(asynchat.async_chat): server: SMTPServer, conn: socket.socket, addr: Any, - data_size_limit: int = 33554432, + data_size_limit: int = ..., map: asyncore._MapType | None = None, enable_SMTPUTF8: bool = False, decode_data: bool = False, @@ -71,7 +71,7 @@ class SMTPServer(asyncore.dispatcher): self, localaddr: _Address, remoteaddr: _Address, - data_size_limit: int = 33554432, + data_size_limit: int = ..., map: asyncore._MapType | None = None, enable_SMTPUTF8: bool = False, decode_data: bool = False, diff --git a/stdlib/xmlrpc/client.pyi b/stdlib/xmlrpc/client.pyi index bd4cf62a0..25c5b6d3f 100644 --- a/stdlib/xmlrpc/client.pyi +++ b/stdlib/xmlrpc/client.pyi @@ -212,7 +212,7 @@ def loads( data: str, use_datetime: bool = False, use_builtin_types: bool = False ) -> tuple[tuple[_Marshallable, ...], str | None]: ... def gzip_encode(data: ReadableBuffer) -> bytes: ... # undocumented -def gzip_decode(data: ReadableBuffer, max_decode: int = 20971520) -> bytes: ... # undocumented +def gzip_decode(data: ReadableBuffer, max_decode: int = ...) -> bytes: ... # undocumented class GzipDecodedResponse(gzip.GzipFile): # undocumented diff --git a/stubs/ldap3/ldap3/protocol/rfc4511.pyi b/stubs/ldap3/ldap3/protocol/rfc4511.pyi index b673e6743..7dcd3f58f 100644 --- a/stubs/ldap3/ldap3/protocol/rfc4511.pyi +++ b/stubs/ldap3/ldap3/protocol/rfc4511.pyi @@ -7,7 +7,7 @@ from pyasn1.type.namedval import NamedValues from pyasn1.type.tag import TagSet from pyasn1.type.univ import Boolean, Choice, Enumerated, Integer, Null, OctetString, Sequence, SequenceOf, SetOf -LDAP_MAX_INT: _Final = 2147483647 +LDAP_MAX_INT: _Final[int] MAXINT: _Final[Integer] rangeInt0ToMaxConstraint: ValueRangeConstraint rangeInt1To127Constraint: ValueRangeConstraint