diff --git a/script/hassfest/codeowners.py b/script/hassfest/codeowners.py index c300976c193e..f95a7b3b5425 100644 --- a/script/hassfest/codeowners.py +++ b/script/hassfest/codeowners.py @@ -49,10 +49,7 @@ def generate_and_validate(integrations: dict[str, Integration], config: Config) for domain in sorted(integrations): integration = integrations[domain] - if ( - not integration.manifest - or integration.manifest.get("integration_type") == "virtual" - ): + if integration.integration_type == "virtual": continue codeowners = integration.manifest["codeowners"] diff --git a/script/hassfest/config_flow.py b/script/hassfest/config_flow.py index e37075c5f756..5ede5daaa354 100644 --- a/script/hassfest/config_flow.py +++ b/script/hassfest/config_flow.py @@ -17,7 +17,7 @@ def _validate_integration(config: Config, integration: Integration) -> None: config_flow_file = integration.path / "config_flow.py" if not config_flow_file.is_file(): - if (integration.manifest or {}).get("config_flow"): + if integration.manifest.get("config_flow"): integration.add_error( "config_flow", "Config flows need to be defined in the file config_flow.py", @@ -149,7 +149,7 @@ def _generate_integrations( primary_domains = { domain for domain, integration in integrations.items() - if integration.manifest and domain not in brand_integration_domains + if domain not in brand_integration_domains } # Add all brands to the set primary_domains |= set(brands) diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py index 3c1f90a67d07..130d3288ab63 100644 --- a/script/hassfest/manifest.py +++ b/script/hassfest/manifest.py @@ -292,7 +292,7 @@ def validate_version(integration: Integration) -> None: Will be removed when the version key is no longer optional for custom integrations. """ - if not (integration.manifest and integration.manifest.get("version")): + if not integration.manifest.get("version"): integration.add_error("manifest", "No 'version' key in the manifest file.") return