Fix positional-only differences in types (#7220)

This commit is contained in:
Alex Waygood
2022-02-15 14:27:09 +00:00
committed by GitHub
parent 7595e2e79b
commit 5e7909d9b3

View File

@@ -174,7 +174,7 @@ class CodeType:
class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
__hash__: None # type: ignore[assignment]
def __init__(self, mapping: SupportsKeysAndGetItem[_KT, _VT_co]) -> None: ...
def __getitem__(self, k: _KT) -> _VT_co: ...
def __getitem__(self, __k: _KT) -> _VT_co: ...
def __iter__(self) -> Iterator[_KT]: ...
def __len__(self) -> int: ...
def copy(self) -> dict[_KT, _VT_co]: ...
@@ -190,9 +190,9 @@ class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):
class SimpleNamespace:
__hash__: None # type: ignore[assignment]
def __init__(self, **kwargs: Any) -> None: ...
def __getattribute__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __delattr__(self, name: str) -> None: ...
def __getattribute__(self, __name: str) -> Any: ...
def __setattr__(self, __name: str, __value: Any) -> None: ...
def __delattr__(self, __name: str) -> None: ...
class ModuleType:
__name__: str
@@ -305,7 +305,7 @@ if sys.version_info >= (3, 7):
__qualname__: str
__objclass__: type
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
def __get__(self, obj: Any, type: type = ...) -> Any: ...
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
@final
class MethodWrapperType:
@@ -314,8 +314,8 @@ if sys.version_info >= (3, 7):
__qualname__: str
__objclass__: type
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
def __eq__(self, __other: object) -> bool: ...
def __ne__(self, __other: object) -> bool: ...
@final
class MethodDescriptorType:
@@ -374,7 +374,7 @@ class GetSetDescriptorType:
__objclass__: type
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
def __set__(self, __instance: Any, __value: Any) -> None: ...
def __delete__(self, obj: Any) -> None: ...
def __delete__(self, __obj: Any) -> None: ...
@final
class MemberDescriptorType:
@@ -383,7 +383,7 @@ class MemberDescriptorType:
__objclass__: type
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
def __set__(self, __instance: Any, __value: Any) -> None: ...
def __delete__(self, obj: Any) -> None: ...
def __delete__(self, __obj: Any) -> None: ...
if sys.version_info >= (3, 7):
def new_class(
@@ -442,5 +442,5 @@ if sys.version_info >= (3, 10):
@final
class UnionType:
__args__: tuple[Any, ...]
def __or__(self, obj: Any) -> UnionType: ...
def __ror__(self, obj: Any) -> UnionType: ...
def __or__(self, __obj: Any) -> UnionType: ...
def __ror__(self, __obj: Any) -> UnionType: ...