mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
ipaddress: make _BaseAddress subclass SupportsInt (#1361)
This commit is contained in:
committed by
Guido van Rossum
parent
9bbcb0822d
commit
56f3d66f47
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Iterator, Optional, Tuple, TypeVar, Union
|
||||
from typing import Any, Iterator, Optional, SupportsInt, Tuple, TypeVar, Union
|
||||
|
||||
_address = Union[bytes, int, str]
|
||||
|
||||
@@ -24,9 +24,9 @@ class _IPAddressBase(_TotalOrderingMixin):
|
||||
@property
|
||||
def version(self): ...
|
||||
|
||||
class _BaseAddress(_IPAddressBase):
|
||||
class _BaseAddress(_IPAddressBase, SupportsInt):
|
||||
def __init__(self, address) -> None: ...
|
||||
def __int__(self): ...
|
||||
def __int__(self) -> int: ...
|
||||
def __eq__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __add__(self, other): ...
|
||||
|
||||
Reference in New Issue
Block a user