Skip to content

Commit 25ce574

Browse files
authored
Remove more components from _IGNORE_ROOT_IMPORT in pylint plugin (home-assistant#154660)
1 parent 3d46ab5 commit 25ce574

File tree

17 files changed

+34
-32
lines changed

17 files changed

+34
-32
lines changed

homeassistant/components/cloud/google_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
1414
from homeassistant.components.google_assistant import DOMAIN as GOOGLE_DOMAIN
15-
from homeassistant.components.google_assistant.helpers import AbstractConfig
15+
from homeassistant.components.google_assistant.helpers import ( # pylint: disable=hass-component-root-import
16+
AbstractConfig,
17+
)
1618
from homeassistant.components.homeassistant.exposed_entities import (
1719
async_expose_entity,
1820
async_get_assistant_settings,

homeassistant/components/cloud/prefs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from homeassistant.auth.const import GROUP_ID_ADMIN
1212
from homeassistant.auth.models import User
1313
from homeassistant.components import webhook
14-
from homeassistant.components.google_assistant.http import (
14+
from homeassistant.components.google_assistant.http import ( # pylint: disable=hass-component-root-import
1515
async_get_users as async_get_google_assistant_users,
1616
)
1717
from homeassistant.core import HomeAssistant, callback

homeassistant/components/config/automation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import uuid
77

88
from homeassistant.components.automation import DOMAIN as AUTOMATION_DOMAIN
9-
from homeassistant.components.automation.config import async_validate_config_item
9+
from homeassistant.components.automation.config import ( # pylint: disable=hass-component-root-import
10+
async_validate_config_item,
11+
)
1012
from homeassistant.config import AUTOMATION_CONFIG_PATH
1113
from homeassistant.const import CONF_ID, SERVICE_RELOAD
1214
from homeassistant.core import HomeAssistant, callback

homeassistant/components/ffmpeg_noise/binary_sensor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
FFmpegManager,
2020
get_ffmpeg_manager,
2121
)
22-
from homeassistant.components.ffmpeg_motion.binary_sensor import FFmpegBinarySensor
22+
from homeassistant.components.ffmpeg_motion.binary_sensor import ( # pylint: disable=hass-component-root-import
23+
FFmpegBinarySensor,
24+
)
2325
from homeassistant.const import CONF_NAME
2426
from homeassistant.core import HomeAssistant
2527
from homeassistant.helpers import config_validation as cv

homeassistant/components/freebox/camera.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
from typing import Any
77

88
from homeassistant.components.camera import CameraEntityFeature
9-
from homeassistant.components.ffmpeg.camera import (
10-
CONF_EXTRA_ARGUMENTS,
11-
CONF_INPUT,
9+
from homeassistant.components.ffmpeg import CONF_EXTRA_ARGUMENTS, CONF_INPUT
10+
from homeassistant.components.ffmpeg.camera import ( # pylint: disable=hass-component-root-import
1211
DEFAULT_ARGUMENTS,
1312
FFmpegCamera,
1413
)

homeassistant/components/homekit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
BinarySensorDeviceClass,
2828
)
2929
from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN
30-
from homeassistant.components.device_automation.trigger import (
30+
from homeassistant.components.device_automation.trigger import ( # pylint: disable=hass-component-root-import
3131
async_validate_trigger_config,
3232
)
3333
from homeassistant.components.event import DOMAIN as EVENT_DOMAIN, EventDeviceClass

pylint/plugins/hass_imports.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,8 @@ class ObsoleteImportMatch:
126126
}
127127

128128
_IGNORE_ROOT_IMPORT = (
129-
"automation",
130129
"bluetooth",
131-
"device_automation",
132130
"device_tracker",
133-
"ffmpeg",
134-
"ffmpeg_motion",
135-
"google_assistant",
136131
"homeassistant",
137132
"homeassistant_hardware",
138133
"http",

tests/components/cloud/test_http_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
)
3434
from homeassistant.components.cloud.const import DEFAULT_EXPOSED_DOMAINS, DOMAIN
3535
from homeassistant.components.cloud.http_api import validate_language_voice
36-
from homeassistant.components.google_assistant.helpers import GoogleEntity
36+
from homeassistant.components.google_assistant.helpers import ( # pylint: disable=hass-component-root-import
37+
GoogleEntity,
38+
)
3739
from homeassistant.components.homeassistant import exposed_entities
3840
from homeassistant.components.websocket_api import ERR_INVALID_FORMAT
3941
from homeassistant.core import HomeAssistant, State

tests/components/knx/test_device_trigger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import voluptuous_serialize
77

88
from homeassistant.components import automation
9-
from homeassistant.components.device_automation import DeviceAutomationType
10-
from homeassistant.components.device_automation.exceptions import (
9+
from homeassistant.components.device_automation import (
10+
DeviceAutomationType,
1111
InvalidDeviceAutomationConfig,
1212
)
1313
from homeassistant.components.knx import DOMAIN, device_trigger

tests/components/lg_netcast/test_device_trigger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import pytest
44

55
from homeassistant.components import automation
6-
from homeassistant.components.device_automation import DeviceAutomationType
7-
from homeassistant.components.device_automation.exceptions import (
6+
from homeassistant.components.device_automation import (
7+
DeviceAutomationType,
88
InvalidDeviceAutomationConfig,
99
)
1010
from homeassistant.components.lg_netcast import DOMAIN, device_trigger

0 commit comments

Comments
 (0)