mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
update SectionProxy.getint()/float/bool stubs to match those of ConfigParser (#3687)
This commit is contained in:
@@ -164,9 +164,18 @@ class SectionProxy(MutableMapping[str, str]):
|
||||
|
||||
# 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: Optional[_section] = ..., fallback: int = ...) -> int: ...
|
||||
def getfloat(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: float = ...) -> float: ...
|
||||
def getboolean(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: bool = ...) -> bool: ...
|
||||
@overload
|
||||
def getint(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ...) -> int: ...
|
||||
@overload
|
||||
def getint(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: _T = ...) -> Union[int, _T]: ...
|
||||
@overload
|
||||
def getfloat(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ...) -> float: ...
|
||||
@overload
|
||||
def getfloat(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: _T = ...) -> Union[float, _T]: ...
|
||||
@overload
|
||||
def getboolean(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ...) -> bool: ...
|
||||
@overload
|
||||
def getboolean(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: _T = ...) -> Union[bool, _T]: ...
|
||||
|
||||
# SectionProxy can have arbitrary attributes when custon converters are used
|
||||
def __getattr__(self, key: str) -> Callable[..., Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user