mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Remove fake base class ipaddress._BaseInterface (#12949)
Also make hostmask a property to improve stubtest
This commit is contained in:
@@ -59,8 +59,6 @@ importlib.abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined
|
||||
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.
|
||||
importlib.machinery.ExtensionFileLoader.get_filename # Wrapped with _check_name decorator which changes runtime signature
|
||||
ipaddress.IPv4Interface.hostmask
|
||||
ipaddress.IPv6Interface.hostmask
|
||||
ipaddress._BaseAddress.is_global
|
||||
ipaddress._BaseAddress.is_link_local
|
||||
ipaddress._BaseAddress.is_loopback
|
||||
|
||||
@@ -128,19 +128,6 @@ class _BaseNetwork(_IPAddressBase, Generic[_A]):
|
||||
@property
|
||||
def hostmask(self) -> _A: ...
|
||||
|
||||
class _BaseInterface(_BaseAddress, Generic[_A, _N]):
|
||||
hostmask: _A
|
||||
netmask: _A
|
||||
network: _N
|
||||
@property
|
||||
def ip(self) -> _A: ...
|
||||
@property
|
||||
def with_hostmask(self) -> str: ...
|
||||
@property
|
||||
def with_netmask(self) -> str: ...
|
||||
@property
|
||||
def with_prefixlen(self) -> str: ...
|
||||
|
||||
class _BaseV4:
|
||||
@property
|
||||
def version(self) -> Literal[4]: ...
|
||||
@@ -154,9 +141,21 @@ class IPv4Address(_BaseV4, _BaseAddress):
|
||||
|
||||
class IPv4Network(_BaseV4, _BaseNetwork[IPv4Address]): ...
|
||||
|
||||
class IPv4Interface(IPv4Address, _BaseInterface[IPv4Address, IPv4Network]):
|
||||
class IPv4Interface(IPv4Address):
|
||||
netmask: IPv4Address
|
||||
network: IPv4Network
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@property
|
||||
def hostmask(self) -> IPv4Address: ...
|
||||
@property
|
||||
def ip(self) -> IPv4Address: ...
|
||||
@property
|
||||
def with_hostmask(self) -> str: ...
|
||||
@property
|
||||
def with_netmask(self) -> str: ...
|
||||
@property
|
||||
def with_prefixlen(self) -> str: ...
|
||||
|
||||
class _BaseV6:
|
||||
@property
|
||||
@@ -184,9 +183,21 @@ class IPv6Network(_BaseV6, _BaseNetwork[IPv6Address]):
|
||||
@property
|
||||
def is_site_local(self) -> bool: ...
|
||||
|
||||
class IPv6Interface(IPv6Address, _BaseInterface[IPv6Address, IPv6Network]):
|
||||
class IPv6Interface(IPv6Address):
|
||||
netmask: IPv6Address
|
||||
network: IPv6Network
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@property
|
||||
def hostmask(self) -> IPv6Address: ...
|
||||
@property
|
||||
def ip(self) -> IPv6Address: ...
|
||||
@property
|
||||
def with_hostmask(self) -> str: ...
|
||||
@property
|
||||
def with_netmask(self) -> str: ...
|
||||
@property
|
||||
def with_prefixlen(self) -> str: ...
|
||||
|
||||
def v4_int_to_packed(address: int) -> bytes: ...
|
||||
def v6_int_to_packed(address: int) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user