mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 22:31:12 +08:00
Review SupportsInt and SupportsFloat usages in 3rd-party stubs (#11003)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from typing import ClassVar, SupportsInt, overload
|
||||
from typing_extensions import Literal, Self, SupportsIndex
|
||||
from _typeshed import ConvertibleToInt
|
||||
from typing import ClassVar, overload
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
from netaddr.core import DictDotLookup
|
||||
from netaddr.ip import IPAddress
|
||||
@@ -40,7 +41,7 @@ class EUI(BaseIdentifier):
|
||||
@property
|
||||
def value(self) -> int: ...
|
||||
@value.setter
|
||||
def value(self, value: str | SupportsInt | SupportsIndex) -> None: ...
|
||||
def value(self, value: ConvertibleToInt) -> None: ...
|
||||
@property
|
||||
def dialect(self) -> type[mac_eui48 | eui64_base]: ...
|
||||
@dialect.setter
|
||||
@@ -77,7 +78,7 @@ class EUI(BaseIdentifier):
|
||||
def bin(self) -> str: ...
|
||||
def eui64(self) -> Self: ...
|
||||
def modified_eui64(self) -> Self: ...
|
||||
def ipv6(self, prefix: str | SupportsInt | SupportsIndex) -> IPAddress: ...
|
||||
def ipv6(self, prefix: ConvertibleToInt) -> IPAddress: ...
|
||||
def ipv6_link_local(self) -> IPAddress: ...
|
||||
@property
|
||||
def info(self) -> DictDotLookup: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from _typeshed import ConvertibleToInt, Incomplete, Unused
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import SupportsInt, overload
|
||||
@@ -71,9 +71,9 @@ class IPAddress(BaseIP):
|
||||
def ipv4(self) -> Self: ...
|
||||
def ipv6(self, ipv4_compatible: bool = False) -> Self: ...
|
||||
def format(self, dialect: type[ipv6_verbose] | None = None) -> str: ...
|
||||
def __or__(self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __and__(self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __xor__(self, other: str | SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __or__(self, other: SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __and__(self, other: SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __xor__(self, other: SupportsInt | SupportsIndex) -> Self: ...
|
||||
def __lshift__(self, numbits: int) -> Self: ...
|
||||
def __rshift__(self, numbits: int) -> Self: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
@@ -148,7 +148,7 @@ class IPRange(BaseIP, IPListMixin):
|
||||
def cidrs(self) -> list[IPNetwork]: ...
|
||||
|
||||
def iter_unique_ips(*args: IPRange | _IPNetworkAddr) -> Iterator[IPAddress]: ...
|
||||
def cidr_abbrev_to_verbose(abbrev_cidr: str | SupportsInt | SupportsIndex) -> str: ...
|
||||
def cidr_abbrev_to_verbose(abbrev_cidr: ConvertibleToInt) -> str: ...
|
||||
def cidr_merge(ip_addrs: Iterable[IPRange | _IPNetworkAddr]) -> list[IPNetwork]: ...
|
||||
def cidr_exclude(target: _IPNetworkAddr, exclude: _IPNetworkAddr) -> list[IPNetwork]: ...
|
||||
def cidr_partition(
|
||||
|
||||
Reference in New Issue
Block a user