Activate mypy for google_pubsub (#54649)

This commit is contained in:
jan iversen 2021-08-17 10:10:56 +02:00 committed by GitHub
parent afade22feb
commit 69bc6bbe48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -375,6 +375,7 @@ omit =
homeassistant/components/google/*
homeassistant/components/google_cloud/tts.py
homeassistant/components/google_maps/device_tracker.py
homeassistant/components/google_pubsub/__init__.py
homeassistant/components/google_travel_time/__init__.py
homeassistant/components/google_travel_time/helpers.py
homeassistant/components/google_travel_time/sensor.py

View File

@ -45,9 +45,12 @@ def setup(hass: HomeAssistant, yaml_config: dict[str, Any]):
config = yaml_config[DOMAIN]
project_id = config[CONF_PROJECT_ID]
topic_name = config[CONF_TOPIC_NAME]
service_principal_path = os.path.join(
hass.config.config_dir, config[CONF_SERVICE_PRINCIPAL]
)
if hass.config.config_dir:
service_principal_path = os.path.join(
hass.config.config_dir, config[CONF_SERVICE_PRINCIPAL]
)
else:
service_principal_path = config[CONF_SERVICE_PRINCIPAL]
if not os.path.isfile(service_principal_path):
_LOGGER.error("Path to credentials file cannot be found")

View File

@ -1367,9 +1367,6 @@ ignore_errors = true
[mypy-homeassistant.components.google_assistant.*]
ignore_errors = true
[mypy-homeassistant.components.google_pubsub.*]
ignore_errors = true
[mypy-homeassistant.components.gpmdp.*]
ignore_errors = true

View File

@ -48,7 +48,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.geniushub.*",
"homeassistant.components.glances.*",
"homeassistant.components.google_assistant.*",
"homeassistant.components.google_pubsub.*",
"homeassistant.components.gpmdp.*",
"homeassistant.components.gree.*",
"homeassistant.components.growatt_server.*",