Files
typeshed/stdlib/netrc.pyi
Ivan Levkivskyi 16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00

16 lines
444 B
Python

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