mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-16 08:06:46 +08:00
Fix Python 3.10.1 problems pointed out by stubtest (#6604)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -24,10 +24,22 @@ def escape_decode(__data: str | bytes, __errors: str | None = ...) -> tuple[str,
|
||||
def escape_encode(__data: bytes, __errors: str | None = ...) -> tuple[bytes, int]: ...
|
||||
def latin_1_decode(__data: bytes, __errors: str | None = ...) -> tuple[str, int]: ...
|
||||
def latin_1_encode(__str: str, __errors: str | None = ...) -> tuple[bytes, int]: ...
|
||||
def raw_unicode_escape_decode(__data: str | bytes, __errors: str | None = ...) -> tuple[str, int]: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def raw_unicode_escape_decode(__data: str | bytes, __errors: str | None = ..., __final: bool = ...) -> tuple[str, int]: ...
|
||||
|
||||
else:
|
||||
def raw_unicode_escape_decode(__data: str | bytes, __errors: str | None = ...) -> tuple[str, int]: ...
|
||||
|
||||
def raw_unicode_escape_encode(__str: str, __errors: str | None = ...) -> tuple[bytes, int]: ...
|
||||
def readbuffer_encode(__data: str | bytes, __errors: str | None = ...) -> tuple[bytes, int]: ...
|
||||
def unicode_escape_decode(__data: str | bytes, __errors: str | None = ...) -> tuple[str, int]: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def unicode_escape_decode(__data: str | bytes, __errors: str | None = ..., __final: bool = ...) -> tuple[str, int]: ...
|
||||
|
||||
else:
|
||||
def unicode_escape_decode(__data: str | bytes, __errors: str | None = ...) -> tuple[str, int]: ...
|
||||
|
||||
def unicode_escape_encode(__str: str, __errors: str | None = ...) -> tuple[bytes, int]: ...
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
|
||||
@@ -201,6 +201,7 @@ if sys.version_info >= (3, 10):
|
||||
unsafe_hash: bool = ...,
|
||||
frozen: bool = ...,
|
||||
match_args: bool = ...,
|
||||
kw_only: bool = ...,
|
||||
slots: bool = ...,
|
||||
) -> type: ...
|
||||
|
||||
|
||||
@@ -724,8 +724,8 @@ if sys.version_info >= (3, 7):
|
||||
__forward_value__: Any | None
|
||||
__forward_is_argument__: bool
|
||||
if sys.version_info >= (3, 9):
|
||||
# The module argument was added in Python 3.9.7.
|
||||
def __init__(self, arg: str, is_argument: bool = ..., module: Any | None = ...) -> None: ...
|
||||
# The module and is_class arguments were added in later Python 3.9 versions.
|
||||
def __init__(self, arg: str, is_argument: bool = ..., module: Any | None = ..., *, is_class: bool = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, arg: str, is_argument: bool = ...) -> None: ...
|
||||
def _evaluate(self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None) -> Any | None: ...
|
||||
|
||||
Reference in New Issue
Block a user