load cleanups (#23112)
* load cleanups * Remove unused methods * Allow importing requirements at the top of a file * Fix test * Lint * Install reqs ASAP when loading platforms
This commit is contained in:
1 parent
4d080f8b17
commit
6a2da9f9a5
8 files changed
+64
-146
No files matched your search
@@ -29,8 +29,6 @@ if TYPE_CHECKING:
|
||||
|
||||
CALLABLE_T = TypeVar('CALLABLE_T', bound=Callable) # noqa pylint: disable=invalid-name
|
||||
|
||||
PREPARED = False
|
||||
|
||||
DEPENDENCY_BLACKLIST = {'config'}
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -170,6 +168,7 @@ async def async_get_integration(hass: 'HomeAssistant', domain: str)\
|
||||
return integration
|
||||
|
||||
except ImportError:
|
||||
# Import error if "custom_components" doesn't exist
|
||||
pass
|
||||
|
||||
from homeassistant import components
|
||||
@@ -376,9 +375,6 @@ async def _async_component_dependencies(hass, # type: HomeAssistant
|
||||
"""
|
||||
integration = await async_get_integration(hass, domain)
|
||||
|
||||
if integration is None:
|
||||
raise IntegrationNotFound(domain)
|
||||
|
||||
loading.add(domain)
|
||||
|
||||
for dependency_domain in integration.dependencies:
|
||||
|
||||
Reference in new issue
Block a user