Fix no-implicit-reexport sorting issue (#72015)

This commit is contained in:
epenet 2022-05-17 17:35:03 +02:00 committed by GitHub
parent 69cc6ab5f1
commit 4d8593402e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -2518,10 +2518,10 @@ warn_unreachable = true
[mypy-homeassistant.components.application_credentials.*]
no_implicit_reexport = true
[mypy-homeassistant.components.spotify.*]
[mypy-homeassistant.components.diagnostics.*]
no_implicit_reexport = true
[mypy-homeassistant.components.diagnostics.*]
[mypy-homeassistant.components.spotify.*]
no_implicit_reexport = true
[mypy-tests.*]

View File

@ -367,7 +367,9 @@ def generate_and_validate(config: Config) -> str:
if strict_module in NO_IMPLICIT_REEXPORT_MODULES:
mypy_config.set(strict_section, "no_implicit_reexport", "true")
for reexport_module in NO_IMPLICIT_REEXPORT_MODULES.difference(strict_modules):
for reexport_module in sorted(
NO_IMPLICIT_REEXPORT_MODULES.difference(strict_modules)
):
reexport_section = f"mypy-{reexport_module}"
mypy_config.add_section(reexport_section)
mypy_config.set(reexport_section, "no_implicit_reexport", "true")