Updates for Python 3.11.0b4 (#8288)

This commit is contained in:
Sebastian Rittau
2022-07-13 13:10:20 +02:00
committed by GitHub
parent b92286982d
commit 91fd79c158
9 changed files with 75 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
import collections # Needed by aliases like DefaultDict, see mypy issue 2986
import sys
from _typeshed import IdentityFunction, ReadableBuffer, Self as TypeshedSelf, SupportsKeysAndGetItem
from _typeshed import IdentityFunction, Incomplete, ReadableBuffer, Self as TypeshedSelf, SupportsKeysAndGetItem
from abc import ABCMeta, abstractmethod
from types import (
BuiltinFunctionType,
@@ -138,6 +138,8 @@ class TypeVar:
if sys.version_info >= (3, 10):
def __or__(self, right: Any) -> _SpecialForm: ...
def __ror__(self, left: Any) -> _SpecialForm: ...
if sys.version_info >= (3, 11):
def __typing_subst__(self, arg: Incomplete) -> Incomplete: ...
# Used for an undocumented mypy feature. Does not exist at runtime.
_promote = object()
@@ -192,6 +194,8 @@ if sys.version_info >= (3, 11):
__name__: str
def __init__(self, name: str) -> None: ...
def __iter__(self) -> Any: ...
def __typing_subst__(self, arg: Never) -> Never: ...
def __typing_prepare_subst__(self, alias: Incomplete, args: Incomplete) -> Incomplete: ...
if sys.version_info >= (3, 10):
class ParamSpecArgs:
@@ -212,6 +216,10 @@ if sys.version_info >= (3, 10):
def args(self) -> ParamSpecArgs: ...
@property
def kwargs(self) -> ParamSpecKwargs: ...
if sys.version_info >= (3, 11):
def __typing_subst__(self, arg: Incomplete) -> Incomplete: ...
def __typing_prepare_subst__(self, alias: Incomplete, args: Incomplete) -> Incomplete: ...
def __or__(self, right: Any) -> _SpecialForm: ...
def __ror__(self, left: Any) -> _SpecialForm: ...
Concatenate: _SpecialForm