mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 04:41:30 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any, Container, Generic, Iterable, Iterator, Optional, SupportsInt, Text, Tuple, TypeVar, overload
|
||||
from typing import Any, Container, Generic, Iterable, Iterator, Optional, SupportsInt, Text, TypeVar, overload
|
||||
|
||||
# Undocumented length constants
|
||||
IPV4LENGTH: int
|
||||
@@ -123,7 +123,7 @@ class IPv6Address(_BaseAddress):
|
||||
@property
|
||||
def sixtofour(self) -> Optional[IPv4Address]: ...
|
||||
@property
|
||||
def teredo(self) -> Optional[Tuple[IPv4Address, IPv4Address]]: ...
|
||||
def teredo(self) -> Optional[tuple[IPv4Address, IPv4Address]]: ...
|
||||
|
||||
class IPv6Network(_BaseNetwork[IPv6Address]):
|
||||
@property
|
||||
@@ -139,11 +139,11 @@ def summarize_address_range(first: IPv4Address, last: IPv4Address) -> Iterator[I
|
||||
def summarize_address_range(first: IPv6Address, last: IPv6Address) -> Iterator[IPv6Network]: ...
|
||||
def collapse_addresses(addresses: Iterable[_N]) -> Iterator[_N]: ...
|
||||
@overload
|
||||
def get_mixed_type_key(obj: _A) -> Tuple[int, _A]: ...
|
||||
def get_mixed_type_key(obj: _A) -> tuple[int, _A]: ...
|
||||
@overload
|
||||
def get_mixed_type_key(obj: IPv4Network) -> Tuple[int, IPv4Address, IPv4Address]: ...
|
||||
def get_mixed_type_key(obj: IPv4Network) -> tuple[int, IPv4Address, IPv4Address]: ...
|
||||
@overload
|
||||
def get_mixed_type_key(obj: IPv6Network) -> Tuple[int, IPv6Address, IPv6Address]: ...
|
||||
def get_mixed_type_key(obj: IPv6Network) -> tuple[int, IPv6Address, IPv6Address]: ...
|
||||
|
||||
class AddressValueError(ValueError): ...
|
||||
class NetmaskValueError(ValueError): ...
|
||||
|
||||
Reference in New Issue
Block a user