mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 09:03:23 +08:00
fix the __init__ of several C-classes (#13211)
This commit is contained in:
@@ -32,7 +32,6 @@ class _IPAddressBase:
|
||||
def version(self) -> int: ...
|
||||
|
||||
class _BaseAddress(_IPAddressBase):
|
||||
def __init__(self, address: object) -> None: ...
|
||||
def __add__(self, other: int) -> Self: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __int__(self) -> int: ...
|
||||
@@ -54,7 +53,6 @@ class _BaseAddress(_IPAddressBase):
|
||||
class _BaseNetwork(_IPAddressBase, Generic[_A]):
|
||||
network_address: _A
|
||||
netmask: _A
|
||||
def __init__(self, address: object, strict: bool = ...) -> None: ...
|
||||
def __contains__(self, other: Any) -> bool: ...
|
||||
def __getitem__(self, n: int) -> _A: ...
|
||||
def __iter__(self) -> Iterator[_A]: ...
|
||||
@@ -114,6 +112,7 @@ class _BaseV4:
|
||||
def max_prefixlen(self) -> Literal[32]: ...
|
||||
|
||||
class IPv4Address(_BaseV4, _BaseAddress):
|
||||
def __init__(self, address: object) -> None: ...
|
||||
@property
|
||||
def is_global(self) -> bool: ...
|
||||
@property
|
||||
@@ -134,7 +133,8 @@ class IPv4Address(_BaseV4, _BaseAddress):
|
||||
@property
|
||||
def ipv6_mapped(self) -> IPv6Address: ...
|
||||
|
||||
class IPv4Network(_BaseV4, _BaseNetwork[IPv4Address]): ...
|
||||
class IPv4Network(_BaseV4, _BaseNetwork[IPv4Address]):
|
||||
def __init__(self, address: object, strict: bool = ...) -> None: ...
|
||||
|
||||
class IPv4Interface(IPv4Address):
|
||||
netmask: IPv4Address
|
||||
@@ -159,6 +159,7 @@ class _BaseV6:
|
||||
def max_prefixlen(self) -> Literal[128]: ...
|
||||
|
||||
class IPv6Address(_BaseV6, _BaseAddress):
|
||||
def __init__(self, address: object) -> None: ...
|
||||
@property
|
||||
def is_global(self) -> bool: ...
|
||||
@property
|
||||
@@ -191,6 +192,7 @@ class IPv6Address(_BaseV6, _BaseAddress):
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class IPv6Network(_BaseV6, _BaseNetwork[IPv6Address]):
|
||||
def __init__(self, address: object, strict: bool = ...) -> None: ...
|
||||
@property
|
||||
def is_site_local(self) -> bool: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user