Skip to content

Commit 0253c05

Browse files
oh, right, I need types or whatever
1 parent 3f51ebb commit 0253c05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mypy/config_parser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def parse_section(
533533
else:
534534
continue
535535
ct = type(dv)
536-
v: Any = None
536+
v = None
537537
try:
538538
if ct is bool:
539539
if isinstance(section, dict):
@@ -681,6 +681,10 @@ def set_strict_flags() -> None:
681681
# (the new_sections for an inline config *always* includes 'disable_error_code' and
682682
# 'enable_error_code' fields, usually empty, which overwrite the old ones),
683683
# we have to manipulate them specially.
684+
if "enable_error_code" in new_sections:
685+
assert isinstance(new_sections["enable_error_code"], list)
686+
if "disable_error_code" in new_sections:
687+
assert isinstance(new_sections["disable_error_code"], list)
684688
new_sections["enable_error_code"] = list(
685689
set(new_sections["enable_error_code"] + sections.get("enable_error_code", []))
686690
)

0 commit comments

Comments
 (0)