mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
clean up ipaddress allowlist entries (#13079)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -33,16 +33,6 @@ http.client.HTTPConnection.response_class # the actual type at runtime is abc.A
|
||||
importlib.abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
importlib.abc.MetaPathFinder.find_spec # Not defined on the actual class, but expected to exist.
|
||||
importlib.abc.PathEntryFinder.find_spec # Not defined on the actual class, but expected to exist.
|
||||
ipaddress._BaseAddress.is_global
|
||||
ipaddress._BaseAddress.is_link_local
|
||||
ipaddress._BaseAddress.is_loopback
|
||||
ipaddress._BaseAddress.is_multicast
|
||||
ipaddress._BaseAddress.is_private
|
||||
ipaddress._BaseAddress.is_reserved
|
||||
ipaddress._BaseAddress.is_unspecified
|
||||
ipaddress._BaseAddress.max_prefixlen
|
||||
ipaddress._BaseAddress.packed
|
||||
ipaddress._BaseNetwork.max_prefixlen
|
||||
numbers.Number.__hash__ # typeshed marks this as abstract but code just sets this as None
|
||||
optparse.Values.__getattr__ # Some attributes are set in __init__ using setattr
|
||||
pickle.Pickler.reducer_override # implemented in C pickler
|
||||
|
||||
@@ -51,25 +51,6 @@ class _BaseAddress(_IPAddressBase):
|
||||
def __gt__(self, other: Self, NotImplemented: Any = ...) -> bool: ...
|
||||
def __le__(self, other: Self, NotImplemented: Any = ...) -> bool: ...
|
||||
|
||||
@property
|
||||
def is_global(self) -> bool: ...
|
||||
@property
|
||||
def is_link_local(self) -> bool: ...
|
||||
@property
|
||||
def is_loopback(self) -> bool: ...
|
||||
@property
|
||||
def is_multicast(self) -> bool: ...
|
||||
@property
|
||||
def is_private(self) -> bool: ...
|
||||
@property
|
||||
def is_reserved(self) -> bool: ...
|
||||
@property
|
||||
def is_unspecified(self) -> bool: ...
|
||||
@property
|
||||
def max_prefixlen(self) -> int: ...
|
||||
@property
|
||||
def packed(self) -> bytes: ...
|
||||
|
||||
class _BaseNetwork(_IPAddressBase, Generic[_A]):
|
||||
network_address: _A
|
||||
netmask: _A
|
||||
@@ -109,8 +90,6 @@ class _BaseNetwork(_IPAddressBase, Generic[_A]):
|
||||
@property
|
||||
def is_unspecified(self) -> bool: ...
|
||||
@property
|
||||
def max_prefixlen(self) -> int: ...
|
||||
@property
|
||||
def num_addresses(self) -> int: ...
|
||||
def overlaps(self, other: _BaseNetwork[IPv4Address] | _BaseNetwork[IPv6Address]) -> bool: ...
|
||||
@property
|
||||
@@ -135,6 +114,22 @@ class _BaseV4:
|
||||
def max_prefixlen(self) -> Literal[32]: ...
|
||||
|
||||
class IPv4Address(_BaseV4, _BaseAddress):
|
||||
@property
|
||||
def is_global(self) -> bool: ...
|
||||
@property
|
||||
def is_link_local(self) -> bool: ...
|
||||
@property
|
||||
def is_loopback(self) -> bool: ...
|
||||
@property
|
||||
def is_multicast(self) -> bool: ...
|
||||
@property
|
||||
def is_private(self) -> bool: ...
|
||||
@property
|
||||
def is_reserved(self) -> bool: ...
|
||||
@property
|
||||
def is_unspecified(self) -> bool: ...
|
||||
@property
|
||||
def packed(self) -> bytes: ...
|
||||
if sys.version_info >= (3, 13):
|
||||
@property
|
||||
def ipv6_mapped(self) -> IPv6Address: ...
|
||||
@@ -164,6 +159,22 @@ class _BaseV6:
|
||||
def max_prefixlen(self) -> Literal[128]: ...
|
||||
|
||||
class IPv6Address(_BaseV6, _BaseAddress):
|
||||
@property
|
||||
def is_global(self) -> bool: ...
|
||||
@property
|
||||
def is_link_local(self) -> bool: ...
|
||||
@property
|
||||
def is_loopback(self) -> bool: ...
|
||||
@property
|
||||
def is_multicast(self) -> bool: ...
|
||||
@property
|
||||
def is_private(self) -> bool: ...
|
||||
@property
|
||||
def is_reserved(self) -> bool: ...
|
||||
@property
|
||||
def is_unspecified(self) -> bool: ...
|
||||
@property
|
||||
def packed(self) -> bytes: ...
|
||||
@property
|
||||
def ipv4_mapped(self) -> IPv4Address | None: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user