Skip to content

Commit 8a821c0

Browse files
get rid of type: ignore[attr-defined]
1 parent 86edd12 commit 8a821c0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mypy/config_parser.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,9 @@ def parse_section(
598598
v = None
599599
try:
600600
if ct is bool:
601-
if isinstance(section, dict):
602-
v = convert_to_boolean(section.get(key))
603-
else:
604-
v = section.getboolean(key) # type: ignore[attr-defined] # Until better stub
601+
# ConfigParser has an equivalent (but poorly-stubbed) getboolean method,
602+
# which we do not use. https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.getboolean
603+
v = convert_to_boolean(section.get(key))
605604
if invert:
606605
v = not v
607606
elif callable(ct):

0 commit comments

Comments
 (0)