Closed
Description
On instantiation, configparser.SectionProxy
takes as an argument the parser that it's a section of and uses setattr
to populate itself with partially applied converters (i.e. methods that start with get
) that the parser it is passed has.
Currently, this is stubbed as:
class SectionProxy(MutableMapping[str, str]):
def __init__(self, parser: RawConfigParser, name: str) -> None: ...
<snip>
# SectionProxy can have arbitrary attributes when custon converters are used
def __getattr__(self, key: str) -> Callable[..., Any]: ...
which means that ConfigParser()['section'].getboolean('key')
type checks as Any
, whereas it should in fact be bool
.
Metadata
Metadata
Assignees
Labels
No labels