mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 12:21:27 +08:00
add (overwrite with) mypy stubs, if available
This commit is contained in:
0
stdlib/3.3/do-not-remove
Normal file
0
stdlib/3.3/do-not-remove
Normal file
200
stdlib/3.3/ipaddress.pyi
Normal file
200
stdlib/3.3/ipaddress.pyi
Normal file
@@ -0,0 +1,200 @@
|
||||
# Stubs for ipaddress (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
IPV4LENGTH = ... # type: Any
|
||||
IPV6LENGTH = ... # type: Any
|
||||
|
||||
class AddressValueError(ValueError): ...
|
||||
class NetmaskValueError(ValueError): ...
|
||||
|
||||
def ip_address(address): ...
|
||||
def ip_network(address, strict=True): ...
|
||||
def ip_interface(address): ...
|
||||
def v4_int_to_packed(address): ...
|
||||
def v6_int_to_packed(address): ...
|
||||
def summarize_address_range(first, last): ...
|
||||
def collapse_addresses(addresses): ...
|
||||
def get_mixed_type_key(obj): ...
|
||||
|
||||
class _TotalOrderingMixin:
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
|
||||
class _IPAddressBase(_TotalOrderingMixin):
|
||||
@property
|
||||
def exploded(self): ...
|
||||
@property
|
||||
def compressed(self): ...
|
||||
@property
|
||||
def version(self): ...
|
||||
|
||||
class _BaseAddress(_IPAddressBase):
|
||||
def __init__(self, address): ...
|
||||
def __int__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __add__(self, other): ...
|
||||
def __sub__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class _BaseNetwork(_IPAddressBase):
|
||||
def __init__(self, address): ...
|
||||
def hosts(self): ...
|
||||
def __iter__(self): ...
|
||||
def __getitem__(self, n): ...
|
||||
def __lt__(self, other): ...
|
||||
def __eq__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __contains__(self, other): ...
|
||||
def overlaps(self, other): ...
|
||||
@property
|
||||
def broadcast_address(self): ...
|
||||
@property
|
||||
def hostmask(self): ...
|
||||
@property
|
||||
def with_prefixlen(self): ...
|
||||
@property
|
||||
def with_netmask(self): ...
|
||||
@property
|
||||
def with_hostmask(self): ...
|
||||
@property
|
||||
def num_addresses(self): ...
|
||||
@property
|
||||
def prefixlen(self): ...
|
||||
def address_exclude(self, other): ...
|
||||
def compare_networks(self, other): ...
|
||||
def subnets(self, prefixlen_diff=1, new_prefix=None): ...
|
||||
def supernet(self, prefixlen_diff=1, new_prefix=None): ...
|
||||
@property
|
||||
def is_multicast(self): ...
|
||||
@property
|
||||
def is_reserved(self): ...
|
||||
@property
|
||||
def is_link_local(self): ...
|
||||
@property
|
||||
def is_private(self): ...
|
||||
@property
|
||||
def is_global(self): ...
|
||||
@property
|
||||
def is_unspecified(self): ...
|
||||
@property
|
||||
def is_loopback(self): ...
|
||||
|
||||
class _BaseV4:
|
||||
def __init__(self, address): ...
|
||||
@property
|
||||
def max_prefixlen(self): ...
|
||||
@property
|
||||
def version(self): ...
|
||||
|
||||
class IPv4Address(_BaseV4, _BaseAddress):
|
||||
def __init__(self, address): ...
|
||||
@property
|
||||
def packed(self): ...
|
||||
@property
|
||||
def is_reserved(self): ...
|
||||
@property
|
||||
def is_private(self): ...
|
||||
@property
|
||||
def is_multicast(self): ...
|
||||
@property
|
||||
def is_unspecified(self): ...
|
||||
@property
|
||||
def is_loopback(self): ...
|
||||
@property
|
||||
def is_link_local(self): ...
|
||||
|
||||
class IPv4Interface(IPv4Address):
|
||||
network = ... # type: Any
|
||||
netmask = ... # type: Any
|
||||
hostmask = ... # type: Any
|
||||
def __init__(self, address): ...
|
||||
def __eq__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
@property
|
||||
def ip(self): ...
|
||||
@property
|
||||
def with_prefixlen(self): ...
|
||||
@property
|
||||
def with_netmask(self): ...
|
||||
@property
|
||||
def with_hostmask(self): ...
|
||||
|
||||
class IPv4Network(_BaseV4, _BaseNetwork):
|
||||
network_address = ... # type: Any
|
||||
netmask = ... # type: Any
|
||||
hosts = ... # type: Any
|
||||
def __init__(self, address, strict=True): ...
|
||||
@property
|
||||
def is_global(self): ...
|
||||
|
||||
class _BaseV6:
|
||||
def __init__(self, address): ...
|
||||
@property
|
||||
def max_prefixlen(self): ...
|
||||
@property
|
||||
def version(self): ...
|
||||
|
||||
class IPv6Address(_BaseV6, _BaseAddress):
|
||||
def __init__(self, address): ...
|
||||
@property
|
||||
def packed(self): ...
|
||||
@property
|
||||
def is_multicast(self): ...
|
||||
@property
|
||||
def is_reserved(self): ...
|
||||
@property
|
||||
def is_link_local(self): ...
|
||||
@property
|
||||
def is_site_local(self): ...
|
||||
@property
|
||||
def is_private(self): ...
|
||||
@property
|
||||
def is_global(self): ...
|
||||
@property
|
||||
def is_unspecified(self): ...
|
||||
@property
|
||||
def is_loopback(self): ...
|
||||
@property
|
||||
def ipv4_mapped(self): ...
|
||||
@property
|
||||
def teredo(self): ...
|
||||
@property
|
||||
def sixtofour(self): ...
|
||||
|
||||
class IPv6Interface(IPv6Address):
|
||||
network = ... # type: Any
|
||||
netmask = ... # type: Any
|
||||
hostmask = ... # type: Any
|
||||
def __init__(self, address): ...
|
||||
def __eq__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
@property
|
||||
def ip(self): ...
|
||||
@property
|
||||
def with_prefixlen(self): ...
|
||||
@property
|
||||
def with_netmask(self): ...
|
||||
@property
|
||||
def with_hostmask(self): ...
|
||||
@property
|
||||
def is_unspecified(self): ...
|
||||
@property
|
||||
def is_loopback(self): ...
|
||||
|
||||
class IPv6Network(_BaseV6, _BaseNetwork):
|
||||
network_address = ... # type: Any
|
||||
netmask = ... # type: Any
|
||||
def __init__(self, address, strict=True): ...
|
||||
def hosts(self): ...
|
||||
@property
|
||||
def is_site_local(self): ...
|
||||
Reference in New Issue
Block a user