Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint suppression cleanups #47248

Merged
merged 5 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add codes to noqa's
  • Loading branch information
scop committed Mar 2, 2021
commit 8c2af5382a73edf5b6c4e42b0c46493bf1d0e376
2 changes: 1 addition & 1 deletion homeassistant/components/automation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
from homeassistant.util.dt import parse_datetime

# Not used except by packages to check config structure
from .config import PLATFORM_SCHEMA # noqa
from .config import PLATFORM_SCHEMA # noqa: F401
from .config import async_validate_config_item
from .const import (
CONF_ACTION,
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/blueprint/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""The blueprint integration."""
from . import websocket_api
from .const import DOMAIN # noqa
from .errors import ( # noqa
from .const import DOMAIN # noqa: F401
from .errors import ( # noqa: F401
BlueprintException,
BlueprintWithNameException,
FailedToLoad,
InvalidBlueprint,
InvalidBlueprintInputs,
MissingInput,
)
from .models import Blueprint, BlueprintInputs, DomainBlueprints # noqa
from .schemas import is_blueprint_instance_config # noqa
from .models import Blueprint, BlueprintInputs, DomainBlueprints # noqa: F401
from .schemas import is_blueprint_instance_config # noqa: F401


async def async_setup(hass, config):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lcn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
DATA_LCN,
DOMAIN,
)
from .schemas import CONFIG_SCHEMA # noqa: 401
from .schemas import CONFIG_SCHEMA # noqa: F401
from .services import (
DynText,
Led,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lovelace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
STORAGE_DASHBOARD_UPDATE_FIELDS,
url_slug,
)
from .system_health import system_health_info # NOQA
from .system_health import system_health_info # noqa: F401

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ps4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from homeassistant.util import location
from homeassistant.util.json import load_json, save_json

from .config_flow import PlayStation4FlowHandler # noqa
from .config_flow import PlayStation4FlowHandler # noqa: F401
from .const import ATTR_MEDIA_IMAGE_URL, COMMANDS, DOMAIN, GAMES_FILE, PS4_DATA

_LOGGER = logging.getLogger(__name__)
Expand Down
10 changes: 5 additions & 5 deletions homeassistant/components/websocket_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from homeassistant.core import HomeAssistant, callback
from homeassistant.loader import bind_hass

from . import commands, connection, const, decorators, http, messages # noqa
from .connection import ActiveConnection # noqa
from .const import ( # noqa
from . import commands, connection, const, decorators, http, messages # noqa: F401
from .connection import ActiveConnection # noqa: F401
from .const import ( # noqa: F401
ERR_HOME_ASSISTANT_ERROR,
ERR_INVALID_FORMAT,
ERR_NOT_FOUND,
Expand All @@ -19,13 +19,13 @@
ERR_UNKNOWN_COMMAND,
ERR_UNKNOWN_ERROR,
)
from .decorators import ( # noqa
from .decorators import ( # noqa: F401
async_response,
require_admin,
websocket_command,
ws_require_user,
)
from .messages import ( # noqa
from .messages import ( # noqa: F401
BASE_COMMAND_MESSAGE_SCHEMA,
error_message,
event_message,
Expand Down
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from unittest.mock import AsyncMock, Mock, patch
import uuid

from aiohttp.test_utils import unused_port as get_test_instance_port # noqa
from aiohttp.test_utils import unused_port as get_test_instance_port # noqa: F401

from homeassistant import auth, config_entries, core as ha, loader
from homeassistant.auth import (
Expand Down
2 changes: 1 addition & 1 deletion tests/components/abode/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

from tests.common import load_fixture
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401


@pytest.fixture(autouse=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/arcam_fmj/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/automation/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Conftest for automation tests."""

from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/axis/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""axis conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/binary_sensor/test_device_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/binary_sensor/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/blebox/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from homeassistant.setup import async_setup_component

from tests.common import MockConfigEntry
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401


def patch_product_identify(path=None, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion tests/components/bond/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""bond conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/climate/test_device_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/climate/test_device_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/climate/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/config/test_automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from homeassistant.bootstrap import async_setup_component
from homeassistant.components import config

from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


async def test_get_device_config(hass, hass_client):
Expand Down
2 changes: 1 addition & 1 deletion tests/components/config/test_device_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from homeassistant.components.config import device_registry

from tests.common import mock_device_registry
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/cover/test_device_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/cover/test_device_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/cover/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/deconz/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""deconz conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/deconz/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration

from tests.common import assert_lists_same, async_get_device_automations
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401

SENSORS = {
"1": {
Expand Down
2 changes: 1 addition & 1 deletion tests/components/default_config/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from homeassistant.setup import async_setup_component

from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/demo/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""demo conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/device_automation/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/device_tracker/test_device_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/device_tracker/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401

AWAY_LATITUDE = 32.881011
AWAY_LONGITUDE = -117.234758
Expand Down
2 changes: 1 addition & 1 deletion tests/components/dynalite/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""dynalite conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/elgato/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""elgato conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/everlights/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""everlights conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/fan/test_device_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/fan/test_device_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/fan/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mock_device_registry,
mock_registry,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/geo_location/test_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from homeassistant.setup import async_setup_component

from tests.common import async_mock_service, mock_component
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/components/group/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""group conftest."""
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/hassio/test_websocket_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.setup import async_setup_component

from . import mock_all # noqa
from . import mock_all # noqa: F401

from tests.common import async_mock_signal

Expand Down
2 changes: 1 addition & 1 deletion tests/components/homeassistant/triggers/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Conftest for HA triggers."""

from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
2 changes: 1 addition & 1 deletion tests/components/homekit_controller/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import homeassistant.util.dt as dt_util

from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
async_get_device_automations,
async_mock_service,
)
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
from tests.components.homekit_controller.common import setup_test_component


Expand Down
2 changes: 1 addition & 1 deletion tests/components/homematicip_cloud/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from .helper import AUTH_TOKEN, HAPID, HAPPIN, HomeFactory

from tests.common import MockConfigEntry
from tests.components.light.conftest import mock_light_profiles # noqa
from tests.components.light.conftest import mock_light_profiles # noqa: F401


@pytest.fixture(name="mock_connection")
Expand Down
Loading