From b972427ad44e12421ae66722766eef6407d8ecb1 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Sun, 26 Jan 2020 04:51:04 -0800 Subject: [PATCH] configparser: fix various arguments (#3632) * configparser: fix various arguments * configparser.ConfigParser: inherit __init__ --- stdlib/3/configparser.pyi | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/stdlib/3/configparser.pyi b/stdlib/3/configparser.pyi index 24f817997ff7..a1fe99b55e11 100644 --- a/stdlib/3/configparser.pyi +++ b/stdlib/3/configparser.pyi @@ -69,7 +69,8 @@ class RawConfigParser(_parser): strict: bool = ..., empty_lines_in_values: bool = ..., default_section: str = ..., - interpolation: Optional[Interpolation] = ...) -> None: ... + interpolation: Optional[Interpolation] = ..., + converters: _converters = ...) -> None: ... def __len__(self) -> int: ... @@ -124,32 +125,18 @@ class RawConfigParser(_parser): @overload def items(self, section: str, raw: bool = ..., vars: Optional[_section] = ...) -> List[Tuple[str, str]]: ... - def set(self, section: str, option: str, value: str) -> None: ... + def set(self, section: str, option: str, value: Optional[str] = ...) -> None: ... - def write(self, - fileobject: IO[str], - space_around_delimiters: bool = ...) -> None: ... + def write(self, fp: IO[str], space_around_delimiters: bool = ...) -> None: ... def remove_option(self, section: str, option: str) -> bool: ... def remove_section(self, section: str) -> bool: ... - def optionxform(self, option: str) -> str: ... + def optionxform(self, optionstr: str) -> str: ... -class ConfigParser(RawConfigParser): - def __init__(self, - defaults: Optional[_section] = ..., - dict_type: Type[Mapping[str, str]] = ..., - allow_no_value: bool = ..., - delimiters: Sequence[str] = ..., - comment_prefixes: Sequence[str] = ..., - inline_comment_prefixes: Optional[Sequence[str]] = ..., - strict: bool = ..., - empty_lines_in_values: bool = ..., - default_section: str = ..., - interpolation: Optional[Interpolation] = ..., - converters: _converters = ...) -> None: ... +class ConfigParser(RawConfigParser): ... class SafeConfigParser(ConfigParser): ...