Stdlib: add many missing __hash__ and __eq__ methods (#10464)

This commit is contained in:
Alex Waygood
2023-07-17 13:21:02 +01:00
committed by GitHub
parent a04822051f
commit 03b4bb9cce
22 changed files with 78 additions and 2 deletions

View File

@@ -148,3 +148,4 @@ class ExtensionFileLoader(importlib.abc.ExecutionLoader):
def exec_module(self, module: types.ModuleType) -> None: ...
def get_code(self, fullname: str) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...

View File

@@ -66,6 +66,9 @@ class EntryPoint(_EntryPointBase):
extras: list[str] = ...,
) -> bool: ... # undocumented
def __hash__(self) -> int: ...
def __eq__(self, other: object) -> bool: ...
if sys.version_info >= (3, 10):
class EntryPoints(list[EntryPoint]): # use as list is deprecated since 3.10
# int argument is deprecated since 3.10