Skip to content

Commit cbf7705

Browse files
authored
Continue reading next config file if no config section in shared config file (#9114)
1 parent 27a9830 commit cbf7705

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/config_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def parse_config_file(options: Options, set_strict_flags: Callable[[], None],
131131
except configparser.Error as err:
132132
print("%s: %s" % (config_file, err), file=stderr)
133133
else:
134+
if config_file in defaults.SHARED_CONFIG_FILES and 'mypy' not in parser:
135+
continue
134136
file_read = config_file
135137
options.config_file = file_read
136138
break

0 commit comments

Comments
 (0)