Update Unused parameters in stubs/ (#9704)

* Update _Unused TypeAlias

* Update `object | None` params

* Replace unused `object` parameters with `Unused` alias
This commit is contained in:
Avasam
2023-02-22 02:52:52 -05:00
committed by GitHub
parent fbc092b4cd
commit 078c6a0958
33 changed files with 134 additions and 133 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from collections.abc import Iterable, Iterator
from typing import SupportsInt, overload
@@ -133,7 +133,7 @@ class IPNetwork(BaseIP, IPListMixin):
def previous(self, step: int = ...) -> Self: ...
def next(self, step: int = ...) -> Self: ...
def supernet(self, prefixlen: int = ...) -> list[IPNetwork]: ...
def subnet(self, prefixlen: int, count: int | None = ..., fmt: object | None = ...) -> Iterator[Self]: ...
def subnet(self, prefixlen: int, count: int | None = ..., fmt: Unused = None) -> Iterator[Self]: ...
def iter_hosts(self) -> Iterator[IPAddress]: ...
class IPRange(BaseIP, IPListMixin):
+2 -1
View File
@@ -1,3 +1,4 @@
from _typeshed import Unused
from collections.abc import Iterable, Sequence
from socket import AddressFamily
from typing_extensions import Literal
@@ -22,7 +23,7 @@ hostmask_to_prefix: dict[int, int]
def valid_str(addr: str, flags: int = ...) -> bool: ...
def str_to_int(addr: str, flags: int = ...) -> int: ...
def int_to_str(int_val: int, dialect: object | None = ...) -> str: ...
def int_to_str(int_val: int, dialect: Unused = None) -> str: ...
def int_to_arpa(int_val: int) -> str: ...
def int_to_packed(int_val: int) -> bytes: ...
def packed_to_int(packed_int: bytes) -> int: ...