mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
Revised stubs for geoip2 third party library (#3317)
This commit is contained in:
committed by
Jelle Zijlstra
parent
f0ccb325aa
commit
57384ce033
@@ -1,5 +1,5 @@
|
||||
from typing import (Any, Container, Generic, Iterable, Iterator, Optional,
|
||||
overload, SupportsInt, Tuple, TypeVar)
|
||||
overload, SupportsInt, Text, Tuple, TypeVar)
|
||||
|
||||
# Undocumented length constants
|
||||
IPV4LENGTH: int
|
||||
@@ -21,11 +21,11 @@ class _IPAddressBase:
|
||||
def __lt__(self: _T, other: _T) -> bool: ...
|
||||
def __ne__(self, other: Any) -> bool: ...
|
||||
@property
|
||||
def compressed(self) -> str: ...
|
||||
def compressed(self) -> Text: ...
|
||||
@property
|
||||
def exploded(self) -> str: ...
|
||||
def exploded(self) -> Text: ...
|
||||
@property
|
||||
def reverse_pointer(self) -> str: ...
|
||||
def reverse_pointer(self) -> Text: ...
|
||||
@property
|
||||
def version(self) -> int: ...
|
||||
|
||||
@@ -90,11 +90,11 @@ class _BaseNetwork(_IPAddressBase, Container[_A], Iterable[_A], Generic[_A]):
|
||||
def subnets(self: _T, prefixlen_diff: int = ..., new_prefix: Optional[int] = ...) -> Iterator[_T]: ...
|
||||
def supernet(self: _T, prefixlen_diff: int = ..., new_prefix: Optional[int] = ...) -> _T: ...
|
||||
@property
|
||||
def with_hostmask(self) -> str: ...
|
||||
def with_hostmask(self) -> Text: ...
|
||||
@property
|
||||
def with_netmask(self) -> str: ...
|
||||
def with_netmask(self) -> Text: ...
|
||||
@property
|
||||
def with_prefixlen(self) -> str: ...
|
||||
def with_prefixlen(self) -> Text: ...
|
||||
@property
|
||||
def hostmask(self) -> _A: ...
|
||||
|
||||
@@ -105,11 +105,11 @@ class _BaseInterface(_BaseAddress, Generic[_A, _N]):
|
||||
@property
|
||||
def ip(self) -> _A: ...
|
||||
@property
|
||||
def with_hostmask(self) -> str: ...
|
||||
def with_hostmask(self) -> Text: ...
|
||||
@property
|
||||
def with_netmask(self) -> str: ...
|
||||
def with_netmask(self) -> Text: ...
|
||||
@property
|
||||
def with_prefixlen(self) -> str: ...
|
||||
def with_prefixlen(self) -> Text: ...
|
||||
|
||||
class IPv4Address(_BaseAddress): ...
|
||||
class IPv4Network(_BaseNetwork[IPv4Address]): ...
|
||||
|
||||
Reference in New Issue
Block a user