diff --git a/stdlib/3/configparser.pyi b/stdlib/3/configparser.pyi index b6ff0dcde258..765ee70694b0 100644 --- a/stdlib/3/configparser.pyi +++ b/stdlib/3/configparser.pyi @@ -100,6 +100,8 @@ class RawConfigParser(_parser): def read_dict(self, dictionary: Mapping[str, Mapping[str, Any]], source: str = ...) -> None: ... + # These get* methods are partially applied (with the same names) in + # SectionProxy; the stubs should be kept updated together def getint(self, section: str, option: str, *, raw: bool = ..., vars: _section = ..., fallback: int = ...) -> int: ... def getfloat(self, section: str, option: str, *, raw: bool = ..., vars: _section = ..., fallback: float = ...) -> float: ... @@ -160,6 +162,13 @@ class SectionProxy(MutableMapping[str, str]): @property def name(self) -> str: ... def get(self, option: str, fallback: Optional[str] = ..., *, raw: bool = ..., vars: Optional[_section] = ..., **kwargs: Any) -> str: ... # type: ignore + + # These are partially-applied version of the methods with the same names in + # RawConfigParser; the stubs should be kept updated together + def getint(self, option: str, *, raw: bool = ..., vars: _section = ..., fallback: int = ...) -> int: ... + def getfloat(self, option: str, *, raw: bool = ..., vars: _section = ..., fallback: float = ...) -> float: ... + def getboolean(self, option: str, *, raw: bool = ..., vars: _section = ..., fallback: bool = ...) -> bool: ... + # SectionProxy can have arbitrary attributes when custon converters are used def __getattr__(self, key: str) -> Callable[..., Any]: ...