Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stubs/netaddr/netaddr/ip/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from _typeshed import ConvertibleToInt, Unused
from abc import abstractmethod
from collections.abc import Iterable, Iterator
from types import ModuleType
from typing import Literal, SupportsIndex, SupportsInt, overload
from typing_extensions import Self, TypeAlias

Expand Down Expand Up @@ -95,7 +96,9 @@ class IPListMixin:
def __contains__(self, other: BaseIP | _IPAddressAddr) -> bool: ...
def __bool__(self) -> Literal[True]: ...

def parse_ip_network(module, addr: tuple[int, int] | str, flags: int = 0, *, expand_partial: bool = False) -> tuple[int, int]: ...
def parse_ip_network(
module: ModuleType, addr: tuple[int, int] | str, flags: int = 0, *, expand_partial: bool = False
) -> tuple[int, int]: ...

class IPNetwork(BaseIP, IPListMixin):
__slots__ = ("_prefixlen",)
Expand Down
16 changes: 8 additions & 8 deletions stubs/netaddr/netaddr/ip/iana.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from _typeshed import Incomplete, SupportsWrite
from _typeshed import SupportsWrite
from collections.abc import Callable, Mapping, MutableMapping
from typing import Any
from typing_extensions import TypeAlias
from xml.sax import handler
from xml.sax.xmlreader import AttributesImpl, XMLReader
from xml.sax import _Source, handler
from xml.sax.xmlreader import AttributesImpl, InputSource, XMLReader

from netaddr.core import Publisher, Subscriber
from netaddr.ip import IPAddress, IPNetwork, IPRange
Expand All @@ -20,8 +20,8 @@ class SaxRecordParser(handler.ContentHandler):

class XMLRecordParser(Publisher):
xmlparser: XMLReader
fh: Incomplete
def __init__(self, fh, **kwargs: object) -> None: ...
fh: InputSource | _Source
def __init__(self, fh: InputSource | _Source, **kwargs: object) -> None: ...
def process_record(self, rec: Mapping[str, object]) -> dict[str, str] | None: ...
def consume_record(self, rec: object) -> None: ...
def parse(self) -> None: ...
Expand All @@ -41,11 +41,11 @@ class MulticastParser(XMLRecordParser):
def normalise_addr(self, addr: str) -> str: ...

class DictUpdater(Subscriber):
dct: MutableMapping[_IanaInfoKey, Incomplete]
dct: MutableMapping[_IanaInfoKey, dict[str, Any]]
topic: str
unique_key: str
def __init__(self, dct: MutableMapping[_IanaInfoKey, Incomplete], topic: str, unique_key: str) -> None: ...
def update(self, data) -> None: ...
def __init__(self, dct: MutableMapping[_IanaInfoKey, dict[str, Any]], topic: str, unique_key: str) -> None: ...
def update(self, data: dict[str, Any]) -> None: ...

def load_info() -> None: ...
def pprint_info(fh: SupportsWrite[str] | None = None) -> None: ...
Expand Down