Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,10 +1,10 @@
from typing import Dict, List, Optional, Text, Tuple
class NetrcParseError(Exception):
filename: Optional[str]
lineno: Optional[int]
filename: str | None
lineno: int | None
msg: str
def __init__(self, msg: str, filename: Optional[Text] = ..., lineno: Optional[int] = ...) -> None: ...
def __init__(self, msg: str, filename: Text | None = ..., lineno: int | None = ...) -> None: ...
# (login, account, password) tuple
_NetrcTuple = Tuple[str, Optional[str], Optional[str]]
@@ -12,5 +12,5 @@ _NetrcTuple = Tuple[str, Optional[str], Optional[str]]
class netrc:
hosts: Dict[str, _NetrcTuple]
macros: Dict[str, List[str]]
def __init__(self, file: Optional[Text] = ...) -> None: ...
def authenticators(self, host: str) -> Optional[_NetrcTuple]: ...
def __init__(self, file: Text | None = ...) -> None: ...
def authenticators(self, host: str) -> _NetrcTuple | None: ...