Create separate entries for each component in mypy.ini (#50030)
This commit is contained in:
parent
982c12bcc9
commit
5fd8e7008e
2 changed files with 1297 additions and 9 deletions
1290
mypy.ini
1290
mypy.ini
File diff suppressed because one or more lines are too long
|
@ -350,7 +350,8 @@ def generate_and_validate(config: Config) -> str:
|
|||
for key in STRICT_SETTINGS:
|
||||
mypy_config.set(components_section, key, "false")
|
||||
|
||||
strict_section = "mypy-" + ",".join(strict_modules)
|
||||
for strict_module in strict_modules:
|
||||
strict_section = f"mypy-{strict_module}"
|
||||
mypy_config.add_section(strict_section)
|
||||
for key in STRICT_SETTINGS:
|
||||
mypy_config.set(strict_section, key, "true")
|
||||
|
@ -361,7 +362,8 @@ def generate_and_validate(config: Config) -> str:
|
|||
for key in STRICT_SETTINGS:
|
||||
mypy_config.set(tests_section, key, "false")
|
||||
|
||||
ignored_section = "mypy-" + ",".join(IGNORED_MODULES)
|
||||
for ignored_module in IGNORED_MODULES:
|
||||
ignored_section = f"mypy-{ignored_module}"
|
||||
mypy_config.add_section(ignored_section)
|
||||
mypy_config.set(ignored_section, "ignore_errors", "true")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue