mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add IO protocols to _typeshed (#4230)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Any, IO, Sequence, Tuple, Union, List, Dict, Protocol, Optional
|
||||
from typing import Any, IO, Sequence, Tuple, Union, List, Dict, Optional
|
||||
from _typeshed import SupportsReadline
|
||||
|
||||
DEFAULTSECT: str
|
||||
MAX_INTERPOLATION_DEPTH: int
|
||||
@@ -50,9 +51,6 @@ class MissingSectionHeaderError(ParsingError):
|
||||
line: Any
|
||||
def __init__(self, filename: str, lineno: Any, line: Any) -> None: ...
|
||||
|
||||
class _Readable(Protocol):
|
||||
def readline(self) -> str: ...
|
||||
|
||||
class RawConfigParser:
|
||||
_dict: Any
|
||||
_sections: Dict[Any, Any]
|
||||
@@ -68,7 +66,7 @@ class RawConfigParser:
|
||||
def has_section(self, section: str) -> bool: ...
|
||||
def options(self, section: str) -> List[str]: ...
|
||||
def read(self, filenames: Union[str, Sequence[str]]) -> List[str]: ...
|
||||
def readfp(self, fp: _Readable, filename: str = ...) -> None: ...
|
||||
def readfp(self, fp: SupportsReadline[str], filename: str = ...) -> None: ...
|
||||
def get(self, section: str, option: str) -> str: ...
|
||||
def items(self, section: str) -> List[Tuple[Any, Any]]: ...
|
||||
def _get(self, section: str, conv: type, option: str) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user