mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
@@ -1,3 +1,4 @@
|
||||
# Error: is not present at runtime
|
||||
# ================================
|
||||
netaddr.ip.iana.XMLRecordParser.__getattr__ # __init__ has `self.__dict__.update(kwargs)`
|
||||
netaddr.tests.*
|
||||
|
||||
# __getattr__ is not present at runtime but __init__ has `self.__dict__.update(kwargs)`
|
||||
netaddr.ip.iana.XMLRecordParser.__getattr__
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version = "0.10.*"
|
||||
version = "1.0.*"
|
||||
upstream_repository = "https://github.com/drkjam/netaddr"
|
||||
|
||||
@@ -6,10 +6,7 @@ from netaddr.core import (
|
||||
ZEROFILL as ZEROFILL,
|
||||
AddrConversionError as AddrConversionError,
|
||||
AddrFormatError as AddrFormatError,
|
||||
N as N,
|
||||
NotRegisteredError as NotRegisteredError,
|
||||
P as P,
|
||||
Z as Z,
|
||||
)
|
||||
from netaddr.eui import EUI as EUI, IAB as IAB, OUI as OUI
|
||||
from netaddr.ip import (
|
||||
@@ -46,7 +43,7 @@ from netaddr.strategy.eui48 import (
|
||||
mac_pgsql as mac_pgsql,
|
||||
mac_unix as mac_unix,
|
||||
mac_unix_expanded as mac_unix_expanded,
|
||||
valid_str as __eui48_valid_str,
|
||||
valid_str as valid_mac,
|
||||
)
|
||||
from netaddr.strategy.eui64 import (
|
||||
eui64_bare as eui64_bare,
|
||||
@@ -54,23 +51,73 @@ from netaddr.strategy.eui64 import (
|
||||
eui64_cisco as eui64_cisco,
|
||||
eui64_unix as eui64_unix,
|
||||
eui64_unix_expanded as eui64_unix_expanded,
|
||||
valid_str as __eui64_valid_str,
|
||||
valid_str as valid_eui64,
|
||||
)
|
||||
from netaddr.strategy.ipv4 import valid_str as __ipv4_valid_str
|
||||
from netaddr.strategy.ipv4 import valid_str as valid_ipv4
|
||||
from netaddr.strategy.ipv6 import (
|
||||
ipv6_compact as ipv6_compact,
|
||||
ipv6_full as ipv6_full,
|
||||
ipv6_verbose as ipv6_verbose,
|
||||
valid_str as __ipv6_valid_str,
|
||||
valid_str as valid_ipv6,
|
||||
)
|
||||
|
||||
# These are reexported with different names
|
||||
valid_ipv4 = __ipv4_valid_str
|
||||
valid_ipv6 = __ipv6_valid_str
|
||||
valid_mac = __eui48_valid_str
|
||||
valid_eui64 = __eui64_valid_str
|
||||
__all__ = [
|
||||
"AddrConversionError",
|
||||
"AddrFormatError",
|
||||
"NotRegisteredError",
|
||||
"ZEROFILL",
|
||||
"INET_ATON",
|
||||
"INET_PTON",
|
||||
"NOHOST",
|
||||
"IPAddress",
|
||||
"IPNetwork",
|
||||
"IPRange",
|
||||
"all_matching_cidrs",
|
||||
"cidr_abbrev_to_verbose",
|
||||
"cidr_exclude",
|
||||
"cidr_merge",
|
||||
"iprange_to_cidrs",
|
||||
"iter_iprange",
|
||||
"iter_unique_ips",
|
||||
"largest_matching_cidr",
|
||||
"smallest_matching_cidr",
|
||||
"spanning_cidr",
|
||||
"IPSet",
|
||||
"IPGlob",
|
||||
"cidr_to_glob",
|
||||
"glob_to_cidrs",
|
||||
"glob_to_iprange",
|
||||
"glob_to_iptuple",
|
||||
"iprange_to_globs",
|
||||
"valid_glob",
|
||||
"valid_nmap_range",
|
||||
"iter_nmap_range",
|
||||
"base85_to_ipv6",
|
||||
"ipv6_to_base85",
|
||||
"EUI",
|
||||
"IAB",
|
||||
"OUI",
|
||||
"valid_ipv4",
|
||||
"valid_ipv6",
|
||||
"ipv6_compact",
|
||||
"ipv6_full",
|
||||
"ipv6_verbose",
|
||||
"mac_eui48",
|
||||
"mac_unix",
|
||||
"mac_unix_expanded",
|
||||
"mac_cisco",
|
||||
"mac_bare",
|
||||
"mac_pgsql",
|
||||
"valid_mac",
|
||||
"eui64_base",
|
||||
"eui64_unix",
|
||||
"eui64_unix_expanded",
|
||||
"eui64_cisco",
|
||||
"eui64_bare",
|
||||
"valid_eui64",
|
||||
"SubnetSplitter",
|
||||
]
|
||||
|
||||
# Module constants
|
||||
__version__: str
|
||||
VERSION: tuple[int, ...]
|
||||
STATUS: str
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Python 2 compatibility module
|
||||
# All members are prefixed with "_", nothing to declare.
|
||||
|
||||
@@ -3,11 +3,8 @@ from collections.abc import Iterator, Mapping
|
||||
from typing import Final
|
||||
|
||||
BIG_ENDIAN_PLATFORM: bool
|
||||
P: Final = 1
|
||||
INET_PTON: Final = 1
|
||||
Z: Final = 2
|
||||
ZEROFILL: Final = 2
|
||||
N: Final = 4
|
||||
NOHOST: Final = 4
|
||||
INET_ATON: Final = 8
|
||||
|
||||
@@ -15,8 +12,6 @@ class AddrFormatError(Exception): ...
|
||||
class AddrConversionError(Exception): ...
|
||||
class NotRegisteredError(Exception): ...
|
||||
|
||||
def num_bits(int_val: int) -> int: ...
|
||||
|
||||
class Subscriber:
|
||||
def update(self, data: Incomplete) -> None: ...
|
||||
|
||||
|
||||
@@ -10,9 +10,6 @@ from netaddr.strategy.eui64 import eui64_base
|
||||
class BaseIdentifier:
|
||||
def __init__(self) -> None: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __long__(self) -> int: ...
|
||||
def __oct__(self) -> str: ...
|
||||
def __hex__(self) -> str: ...
|
||||
def __index__(self) -> int: ...
|
||||
|
||||
class OUI(BaseIdentifier):
|
||||
|
||||
@@ -27,7 +27,6 @@ class BaseIP:
|
||||
def is_unicast(self) -> bool: ...
|
||||
def is_multicast(self) -> bool: ...
|
||||
def is_loopback(self) -> bool: ...
|
||||
def is_private(self) -> bool: ...
|
||||
def is_link_local(self) -> bool: ...
|
||||
def is_reserved(self) -> bool: ...
|
||||
def is_ipv4_mapped(self) -> bool: ...
|
||||
@@ -54,9 +53,6 @@ class IPAddress(BaseIP):
|
||||
def key(self) -> tuple[int, ...]: ...
|
||||
def sort_key(self) -> tuple[int, ...]: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __long__(self) -> int: ...
|
||||
def __oct__(self) -> str: ...
|
||||
def __hex__(self) -> str: ...
|
||||
def __index__(self) -> int: ...
|
||||
def __bytes__(self) -> bytes: ...
|
||||
def bits(self, word_sep: str | None = None) -> str: ...
|
||||
@@ -96,14 +92,10 @@ class IPListMixin:
|
||||
def __contains__(self, other: BaseIP | _IPAddressAddr) -> bool: ...
|
||||
def __bool__(self) -> Literal[True]: ...
|
||||
|
||||
def parse_ip_network(
|
||||
module: Incomplete, addr: tuple[int, int] | str, implicit_prefix: bool = False, flags: int = 0
|
||||
) -> tuple[int, int]: ...
|
||||
def parse_ip_network(module: Incomplete, addr: tuple[int, int] | str, flags: int = 0) -> tuple[int, int]: ...
|
||||
|
||||
class IPNetwork(BaseIP, IPListMixin):
|
||||
def __init__(
|
||||
self, addr: _IPNetworkAddr, implicit_prefix: bool = False, version: Literal[4, 6] | None = None, flags: int = 0
|
||||
) -> None: ...
|
||||
def __init__(self, addr: _IPNetworkAddr, version: Literal[4, 6] | None = None, flags: int = 0) -> None: ...
|
||||
@property
|
||||
def prefixlen(self) -> int: ...
|
||||
@prefixlen.setter
|
||||
@@ -167,7 +159,6 @@ def all_matching_cidrs(ip: _IPAddressAddr, cidrs: Iterable[_IPNetworkAddr]) -> l
|
||||
|
||||
IPV4_LOOPBACK: IPNetwork
|
||||
IPV4_PRIVATE_USE: list[IPNetwork]
|
||||
IPV4_PRIVATEISH: tuple[IPNetwork | IPRange, ...]
|
||||
IPV4_LINK_LOCAL: IPNetwork
|
||||
IPV4_MULTICAST: IPNetwork
|
||||
IPV4_6TO4: IPNetwork
|
||||
@@ -176,7 +167,6 @@ IPV4_NOT_GLOBALLY_REACHABLE: list[IPNetwork]
|
||||
IPV4_NOT_GLOBALLY_REACHABLE_EXCEPTIONS: list[IPNetwork]
|
||||
IPV6_LOOPBACK: IPNetwork
|
||||
IPV6_UNIQUE_LOCAL: IPNetwork
|
||||
IPV6_PRIVATEISH: tuple[IPNetwork, ...]
|
||||
IPV6_LINK_LOCAL: IPNetwork
|
||||
IPV6_MULTICAST: IPNetwork
|
||||
IPV6_RESERVED: tuple[IPNetwork, ...]
|
||||
|
||||
@@ -2,10 +2,7 @@ from collections.abc import Iterable, Sequence
|
||||
from re import Pattern
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
AF_LINK: Literal[48]
|
||||
width: Literal[48]
|
||||
family: Literal[48]
|
||||
family_name: Literal["MAC"]
|
||||
version: Literal[48]
|
||||
max_int: int
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@ from collections.abc import Iterable, Sequence
|
||||
from re import Pattern
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
AF_EUI64: Literal[64]
|
||||
width: Literal[64]
|
||||
family: Literal[64]
|
||||
family_name: Literal["EUI-64"]
|
||||
version: Literal[64]
|
||||
max_int: int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user