Configure autoflake for pre-commit (#82414)
This commit is contained in:
parent
bf3c6e5f58
commit
e4c73259f7
17 changed files with 11 additions and 33 deletions
|
@ -4,6 +4,13 @@ repos:
|
|||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py39-plus]
|
||||
- repo: https://github.com/PyCQA/autoflake
|
||||
rev: v1.7.7
|
||||
hooks:
|
||||
- id: autoflake
|
||||
args:
|
||||
- --in-place
|
||||
- --remove-all-unused-imports
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.10.0
|
||||
hooks:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Core module for Zigbee Home Automation."""
|
||||
|
||||
# flake8: noqa
|
||||
from .device import ZHADevice
|
||||
from .gateway import ZHAGateway
|
||||
|
||||
__all__ = ["ZHADevice", "ZHAGateway"]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit
|
||||
|
||||
autoflake==1.7.7
|
||||
bandit==1.7.4
|
||||
black==22.10.0
|
||||
codespell==2.1.0
|
||||
|
|
|
@ -215,7 +215,6 @@ class MockBleakClient(BleakClient):
|
|||
|
||||
async def disconnect(self, *args, **kwargs):
|
||||
"""Mock disconnect."""
|
||||
pass
|
||||
|
||||
async def get_services(self, *args, **kwargs):
|
||||
"""Mock get_services."""
|
||||
|
|
|
@ -31,7 +31,6 @@ class MockBleakClient:
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Mock BleakClient."""
|
||||
pass
|
||||
|
||||
async def __aenter__(self, *args, **kwargs):
|
||||
"""Mock BleakClient.__aenter__."""
|
||||
|
@ -39,7 +38,6 @@ class MockBleakClient:
|
|||
|
||||
async def __aexit__(self, *args, **kwargs):
|
||||
"""Mock BleakClient.__aexit__."""
|
||||
pass
|
||||
|
||||
|
||||
class MockBleakClientTimesOut(MockBleakClient):
|
||||
|
|
|
@ -69,7 +69,6 @@ async def test_get_entries(hass, client, clear_handlers):
|
|||
@callback
|
||||
def async_get_options_flow(config_entry):
|
||||
"""Get options flow."""
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
@callback
|
||||
|
|
|
@ -17,7 +17,6 @@ class FidoClientMock:
|
|||
|
||||
def __init__(self, username, password, timeout=None, httpsession=None):
|
||||
"""Fake Fido client init."""
|
||||
pass
|
||||
|
||||
def get_phone_numbers(self):
|
||||
"""Return Phone numbers."""
|
||||
|
@ -29,7 +28,6 @@ class FidoClientMock:
|
|||
|
||||
async def fetch_data(self):
|
||||
"""Return fake fetching data."""
|
||||
pass
|
||||
|
||||
|
||||
class FidoClientMockError(FidoClientMock):
|
||||
|
|
|
@ -27,7 +27,6 @@ from tests.components.recorder.common import (
|
|||
def test_setup():
|
||||
"""Test setup method of history."""
|
||||
# Verification occurs in the fixture
|
||||
pass
|
||||
|
||||
|
||||
def test_get_significant_states(hass_history):
|
||||
|
|
|
@ -68,7 +68,6 @@ class MockConnection:
|
|||
|
||||
async def connect(self):
|
||||
"""Mock connect."""
|
||||
pass
|
||||
|
||||
@property
|
||||
def connected(self):
|
||||
|
@ -82,7 +81,6 @@ class MockConnection:
|
|||
|
||||
async def close(self):
|
||||
"""Mock close."""
|
||||
pass
|
||||
|
||||
@property
|
||||
def server(self):
|
||||
|
@ -99,7 +97,6 @@ class MockWSConnection:
|
|||
|
||||
async def connect(self):
|
||||
"""Mock connect."""
|
||||
pass
|
||||
|
||||
@property
|
||||
def connected(self):
|
||||
|
@ -113,7 +110,6 @@ class MockWSConnection:
|
|||
|
||||
async def close(self):
|
||||
"""Mock close."""
|
||||
pass
|
||||
|
||||
@property
|
||||
def server(self):
|
||||
|
|
|
@ -30,7 +30,6 @@ class MockUser:
|
|||
|
||||
def get_image(self):
|
||||
"""Get mock image."""
|
||||
pass
|
||||
|
||||
def get_recent_tracks(self, limit):
|
||||
"""Get mock recent tracks."""
|
||||
|
|
|
@ -18,7 +18,6 @@ from homeassistant.setup import async_setup_component
|
|||
@pytest.fixture(autouse=True)
|
||||
def mock_dev_track(mock_device_tracker_conf):
|
||||
"""Mock device tracker config loading."""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -139,7 +139,6 @@ async def test_qos_encoding_default(hass, mqtt_mock_entry_no_yaml_config, caplog
|
|||
@callback
|
||||
def msg_callback(*args):
|
||||
"""Do nothing."""
|
||||
pass
|
||||
|
||||
sub_state = None
|
||||
sub_state = async_prepare_subscribe_topics(
|
||||
|
@ -158,7 +157,6 @@ async def test_qos_encoding_custom(hass, mqtt_mock_entry_no_yaml_config, caplog)
|
|||
@callback
|
||||
def msg_callback(*args):
|
||||
"""Do nothing."""
|
||||
pass
|
||||
|
||||
sub_state = None
|
||||
sub_state = async_prepare_subscribe_topics(
|
||||
|
|
|
@ -210,43 +210,33 @@ class MockClient:
|
|||
|
||||
async def panic(self, code):
|
||||
"""Handle panic."""
|
||||
pass
|
||||
|
||||
async def disarm(self, code):
|
||||
"""Handle disarm."""
|
||||
pass
|
||||
|
||||
async def arm_away(self, code):
|
||||
"""Handle arm_away."""
|
||||
pass
|
||||
|
||||
async def arm_home(self, code):
|
||||
"""Handle arm_home."""
|
||||
pass
|
||||
|
||||
async def aux(self, output_id, state):
|
||||
"""Handle auxiliary control."""
|
||||
pass
|
||||
|
||||
async def keepalive(self):
|
||||
"""Handle keepalive."""
|
||||
pass
|
||||
|
||||
async def update(self):
|
||||
"""Handle update."""
|
||||
pass
|
||||
|
||||
def on_zone_change(self):
|
||||
"""Handle on_zone_change."""
|
||||
pass
|
||||
|
||||
def on_state_change(self):
|
||||
"""Handle on_state_change."""
|
||||
pass
|
||||
|
||||
async def close(self):
|
||||
"""Handle close."""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -35,7 +35,6 @@ LOCATION_MESSAGE = {
|
|||
@pytest.fixture(autouse=True)
|
||||
def mock_dev_track(mock_device_tracker_conf):
|
||||
"""Mock device tracker config loading."""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -16,7 +16,7 @@ from homeassistant.components.tellduslive import (
|
|||
from homeassistant.config_entries import SOURCE_DISCOVERY
|
||||
from homeassistant.const import CONF_HOST
|
||||
|
||||
from tests.common import MockConfigEntry, mock_coro
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
def init_config_flow(hass, side_effect=None):
|
||||
|
|
|
@ -20,7 +20,6 @@ class MockBleakClient:
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Mock BleakClient."""
|
||||
pass
|
||||
|
||||
async def __aenter__(self, *args, **kwargs):
|
||||
"""Mock BleakClient.__aenter__."""
|
||||
|
@ -28,15 +27,12 @@ class MockBleakClient:
|
|||
|
||||
async def __aexit__(self, *args, **kwargs):
|
||||
"""Mock BleakClient.__aexit__."""
|
||||
pass
|
||||
|
||||
async def connect(self, *args, **kwargs):
|
||||
"""Mock BleakClient.connect."""
|
||||
pass
|
||||
|
||||
async def disconnect(self, *args, **kwargs):
|
||||
"""Mock BleakClient.disconnect."""
|
||||
pass
|
||||
|
||||
|
||||
class MockBleakClientBattery5(MockBleakClient):
|
||||
|
|
|
@ -5,4 +5,3 @@ async def async_setup_platform(
|
|||
hass, config, async_add_entities_callback, discovery_info=None
|
||||
):
|
||||
"""Find and return test switches."""
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue