Allow disabling integrations in manifest, block uuid package being installed and disable ezviz (#38444)

This commit is contained in:
Paulus Schoutsen 2020-08-26 10:20:14 +02:00 committed by GitHub
parent eaac00acfc
commit 2a9da208d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 40 additions and 5 deletions

View file

@ -71,6 +71,9 @@ enum34==1000000000.0.0
# This is a old unmaintained library and is replaced with pycryptodome
pycrypto==1000000000.0.0
# This is built-in and breaks pip if installed
uuid==1000000000.0.0
"""
IGNORE_PRE_COMMIT_HOOK_ID = (
@ -178,6 +181,9 @@ def gather_requirements_from_manifests(errors, reqs):
errors.append(f"The manifest for integration {domain} is invalid.")
continue
if integration.disabled:
continue
process_requirements(
errors, integration.requirements, f"homeassistant.components.{domain}", reqs
)

View file

@ -54,6 +54,7 @@ MANIFEST_SCHEMA = vol.Schema(
vol.Optional("dependencies"): [str],
vol.Optional("after_dependencies"): [str],
vol.Required("codeowners"): [str],
vol.Optional("disabled"): str,
}
)

View file

@ -73,6 +73,11 @@ class Integration:
"""Integration domain."""
return self.path.name
@property
def disabled(self) -> Optional[str]:
"""List of disabled."""
return self.manifest.get("disabled")
@property
def requirements(self) -> List[str]:
"""List of requirements."""