1
mirror of https://github.com/home-assistant/core synced 2024-07-18 12:02:20 +02:00

Remove hassfest blacklisted rest (#32441)

* Remove blacklisted deps from hassfest deps

* Whitelist all internal integrations
This commit is contained in:
Paulus Schoutsen 2020-03-03 13:57:09 -08:00 committed by GitHub
parent fed23030d6
commit db7d0eb9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 23 deletions

View File

@ -4,5 +4,6 @@
"documentation": "https://www.home-assistant.io/integrations/dwd_weather_warnings",
"requirements": [],
"dependencies": [],
"after_dependencies": ["rest"],
"codeowners": []
}

View File

@ -4,6 +4,7 @@
"documentation": "https://www.home-assistant.io/integrations/emulated_hue",
"requirements": ["aiohttp_cors==0.7.0"],
"dependencies": [],
"after_dependencies": ["http"],
"codeowners": [],
"quality_scale": "internal"
}

View File

@ -65,7 +65,7 @@ class ImportCollector(ast.NodeVisitor):
# self.hass.components.hue.async_create()
# Name(id=self)
# .Attribute(attr=hass)
# .Attribute(attr=hass) or .Attribute(attr=_hass)
# .Attribute(attr=hue)
# .Attribute(attr=async_create)
if (
@ -78,7 +78,7 @@ class ImportCollector(ast.NodeVisitor):
)
or (
isinstance(node.value.value, ast.Attribute)
and node.value.value.attr == "hass"
and node.value.value.attr in ("hass", "_hass")
)
)
):
@ -89,20 +89,47 @@ class ImportCollector(ast.NodeVisitor):
ALLOWED_USED_COMPONENTS = {
# This component will always be set up
"persistent_notification",
# These allow to register things without being set up
"conversation",
"frontend",
"hassio",
"system_health",
"websocket_api",
# Internal integrations
"alert",
"automation",
"conversation",
"device_automation",
"zone",
"frontend",
"group",
"hassio",
"homeassistant",
"system_log",
"input_boolean",
"input_datetime",
"input_number",
"input_select",
"input_text",
"persistent_notification",
"person",
"script",
"shopping_list",
"sun",
"system_health",
"system_log",
"timer",
"webhook",
"websocket_api",
"zone",
# Entity integrations with platforms
"alarm_control_panel",
"binary_sensor",
"climate",
"cover",
"device_tracker",
"fan",
"image_processing",
"light",
"lock",
"media_player",
"scene",
"sensor",
"switch",
"vacuum",
"water_heater",
# Other
"mjpeg", # base class, has no reqs or component to load.
"stream", # Stream cannot install on all systems, can be imported without reqs.
@ -121,18 +148,7 @@ IGNORE_VIOLATIONS = {
# This should become a helper method that integrations can submit data to
("websocket_api", "lovelace"),
("websocket_api", "shopping_list"),
# Expose HA to external systems
"homekit",
"alexa",
"google_assistant",
"emulated_hue",
"prometheus",
"conversation",
"logbook",
"mobile_app",
# These should be extracted to external package
"pvoutput",
"dwd_weather_warnings",
}