Skip to content

Fix positional-only differences in types #7220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions stdlib/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]: ...
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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(
Expand Down Expand Up @@ -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: ...