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

View File

@@ -2,10 +2,10 @@ from _typeshed import StrOrBytesPath
from typing import Dict, List, Optional, 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[StrOrBytesPath] = ..., lineno: Optional[int] = ...) -> None: ...
def __init__(self, msg: str, filename: StrOrBytesPath | None = ..., lineno: int | None = ...) -> None: ...
# (login, account, password) tuple
_NetrcTuple = Tuple[str, Optional[str], Optional[str]]
@@ -13,5 +13,5 @@ _NetrcTuple = Tuple[str, Optional[str], Optional[str]]
class netrc:
hosts: Dict[str, _NetrcTuple]
macros: Dict[str, List[str]]
def __init__(self, file: Optional[StrOrBytesPath] = ...) -> None: ...
def authenticators(self, host: str) -> Optional[_NetrcTuple]: ...
def __init__(self, file: StrOrBytesPath | None = ...) -> None: ...
def authenticators(self, host: str) -> _NetrcTuple | None: ...