Skip to content

Commit d13067a

Browse files
authored
Remove rest from _IGNORE_ROOT_IMPORT in pylint plugin (home-assistant#154662)
1 parent 64da32b commit d13067a

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

homeassistant/components/scrape/config_flow.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99
import voluptuous as vol
1010

1111
from homeassistant.components.rest import create_rest_data_from_config
12-
from homeassistant.components.rest.data import DEFAULT_TIMEOUT
13-
from homeassistant.components.rest.schema import DEFAULT_METHOD, METHODS
12+
from homeassistant.components.rest.data import ( # pylint: disable=hass-component-root-import
13+
DEFAULT_TIMEOUT,
14+
)
15+
from homeassistant.components.rest.schema import ( # pylint: disable=hass-component-root-import
16+
DEFAULT_METHOD,
17+
METHODS,
18+
)
1419
from homeassistant.components.sensor import (
1520
CONF_STATE_CLASS,
1621
DOMAIN as SENSOR_DOMAIN,

homeassistant/components/scrape/coordinator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
from bs4 import BeautifulSoup
1010

11-
from homeassistant.components.rest import RestData
12-
from homeassistant.components.rest.const import CONF_PAYLOAD_TEMPLATE
11+
from homeassistant.components.rest import CONF_PAYLOAD_TEMPLATE, RestData
1312
from homeassistant.config_entries import ConfigEntry
1413
from homeassistant.const import CONF_RESOURCE_TEMPLATE
1514
from homeassistant.core import HomeAssistant

pylint/plugins/hass_imports.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ class ObsoleteImportMatch:
132132
"homeassistant_hardware",
133133
"http",
134134
"recorder",
135-
"rest",
136135
)
137136

138137

tests/components/scrape/conftest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99

1010
import pytest
1111

12-
from homeassistant.components.rest.data import DEFAULT_TIMEOUT
13-
from homeassistant.components.rest.schema import DEFAULT_METHOD, DEFAULT_VERIFY_SSL
12+
from homeassistant.components.rest.data import ( # pylint: disable=hass-component-root-import
13+
DEFAULT_TIMEOUT,
14+
)
15+
from homeassistant.components.rest.schema import ( # pylint: disable=hass-component-root-import
16+
DEFAULT_METHOD,
17+
DEFAULT_VERIFY_SSL,
18+
)
1419
from homeassistant.components.scrape.const import (
1520
CONF_ENCODING,
1621
CONF_INDEX,

tests/components/scrape/test_config_flow.py

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

88
from homeassistant import config_entries
9-
from homeassistant.components.rest.data import DEFAULT_TIMEOUT
10-
from homeassistant.components.rest.schema import DEFAULT_METHOD
9+
from homeassistant.components.rest.data import ( # pylint: disable=hass-component-root-import
10+
DEFAULT_TIMEOUT,
11+
)
12+
from homeassistant.components.rest.schema import ( # pylint: disable=hass-component-root-import
13+
DEFAULT_METHOD,
14+
)
1115
from homeassistant.components.scrape import DOMAIN
1216
from homeassistant.components.scrape.const import (
1317
CONF_ENCODING,

0 commit comments

Comments
 (0)