Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions
+1 -4
View File
@@ -10,10 +10,7 @@ class Reader:
def __init__(self, filename: Text, locales: _Locales = ..., mode: int = ...) -> None: ...
def __enter__(self) -> Reader: ...
def __exit__(
self,
exc_type: Optional[Type[BaseException]] = ...,
exc_val: Optional[BaseException] = ...,
exc_tb: Optional[TracebackType] = ...,
self, exc_type: Type[BaseException] | None = ..., exc_val: BaseException | None = ..., exc_tb: TracebackType | None = ...
) -> None: ...
def country(self, ip_address: Text) -> Country: ...
def city(self, ip_address: Text) -> City: ...
+4 -4
View File
@@ -1,13 +1,13 @@
from typing import Optional, Text
from typing import Text
class GeoIP2Error(RuntimeError): ...
class AddressNotFoundError(GeoIP2Error): ...
class AuthenticationError(GeoIP2Error): ...
class HTTPError(GeoIP2Error):
http_status: Optional[int]
uri: Optional[Text]
def __init__(self, message: Text, http_status: Optional[int] = ..., uri: Optional[Text] = ...) -> None: ...
http_status: int | None
uri: Text | None
def __init__(self, message: Text, http_status: int | None = ..., uri: Text | None = ...) -> None: ...
class InvalidRequestError(GeoIP2Error): ...
class OutOfQueriesError(GeoIP2Error): ...
+11 -11
View File
@@ -33,30 +33,30 @@ class AnonymousIP(SimpleModel):
is_hosting_provider: bool
is_public_proxy: bool
is_tor_exit_node: bool
ip_address: Optional[Text]
ip_address: Text | None
raw: _RawResponse
def __init__(self, raw: _RawResponse) -> None: ...
class ASN(SimpleModel):
autonomous_system_number: Optional[int]
autonomous_system_organization: Optional[Text]
ip_address: Optional[Text]
autonomous_system_number: int | None
autonomous_system_organization: Text | None
ip_address: Text | None
raw: _RawResponse
def __init__(self, raw: _RawResponse) -> None: ...
class ConnectionType(SimpleModel):
connection_type: Optional[Text]
ip_address: Optional[Text]
connection_type: Text | None
ip_address: Text | None
raw: _RawResponse
def __init__(self, raw: _RawResponse) -> None: ...
class Domain(SimpleModel):
domain: Optional[Text]
ip_address: Optional[Text]
raw: Optional[Text]
domain: Text | None
ip_address: Text | None
raw: Text | None
def __init__(self, raw: _RawResponse) -> None: ...
class ISP(ASN):
isp: Optional[Text]
organization: Optional[Text]
isp: Text | None
organization: Text | None
def __init__(self, raw: _RawResponse) -> None: ...