mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-08 20:43:25 +08:00
Implement a stub for netrc standard module (#2098)
This commit is contained in:
committed by
Ivan Levkivskyi
parent
29bf24b8b9
commit
142c7488a5
19
stdlib/2and3/netrc.pyi
Normal file
19
stdlib/2and3/netrc.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import AnyStr, Dict, List, Optional, Tuple, overload
|
||||
|
||||
|
||||
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]: ...
|
||||
Reference in New Issue
Block a user