diff --git a/mypy.ini b/mypy.ini index 0f698bda35d..8f0b1868bce 100644 --- a/mypy.ini +++ b/mypy.ini @@ -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.*] diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 3517307548b..0b705fab983 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -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")