mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 01:23:24 +08:00
ConfigParser: accept readline() that takes no arguments (#4433)
At runtime readline() is called without arguments, so requiring an optional argument may result in false positives.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import SupportsReadline
|
||||
from _typeshed import SupportsNoArgReadline
|
||||
from typing import IO, Any, Dict, List, Optional, Sequence, Tuple, Union
|
||||
|
||||
DEFAULTSECT: str
|
||||
@@ -66,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: SupportsReadline[str], filename: str = ...) -> None: ...
|
||||
def readfp(self, fp: SupportsNoArgReadline[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