diff --git a/homeassistant/components/abode.py b/homeassistant/components/abode.py index 6d5feb87dc2..bafbc0781ca 100644 --- a/homeassistant/components/abode.py +++ b/homeassistant/components/abode.py @@ -85,7 +85,7 @@ ABODE_PLATFORMS = [ ] -class AbodeSystem(object): +class AbodeSystem: """Abode System class.""" def __init__(self, username, password, cache, diff --git a/homeassistant/components/ads/__init__.py b/homeassistant/components/ads/__init__.py index d603843f51f..100444c0211 100644 --- a/homeassistant/components/ads/__init__.py +++ b/homeassistant/components/ads/__init__.py @@ -110,7 +110,7 @@ NotificationItem = namedtuple( ) -class AdsHub(object): +class AdsHub: """Representation of an ADS connection.""" def __init__(self, ads_client): diff --git a/homeassistant/components/alexa/intent.py b/homeassistant/components/alexa/intent.py index b6d406bd550..8d4520d74e8 100644 --- a/homeassistant/components/alexa/intent.py +++ b/homeassistant/components/alexa/intent.py @@ -210,7 +210,7 @@ def resolve_slot_synonyms(key, request): return resolved_value -class AlexaResponse(object): +class AlexaResponse: """Help generating the response for Alexa.""" def __init__(self, hass, intent_info): diff --git a/homeassistant/components/alexa/smart_home.py b/homeassistant/components/alexa/smart_home.py index 9b7da71a293..80fa4ccb4bf 100644 --- a/homeassistant/components/alexa/smart_home.py +++ b/homeassistant/components/alexa/smart_home.py @@ -55,7 +55,7 @@ HANDLERS = Registry() ENTITY_ADAPTERS = Registry() -class _DisplayCategory(object): +class _DisplayCategory: """Possible display categories for Discovery response. https://developer.amazon.com/docs/device-apis/alexa-discovery.html#display-categories @@ -153,7 +153,7 @@ class _UnsupportedProperty(Exception): """This entity does not support the requested Smart Home API property.""" -class _AlexaEntity(object): +class _AlexaEntity: """An adaptation of an entity, expressed in Alexa's terms. The API handlers should manipulate entities only through this interface. @@ -208,7 +208,7 @@ class _AlexaEntity(object): raise NotImplementedError -class _AlexaInterface(object): +class _AlexaInterface: def __init__(self, entity): self.entity = entity @@ -615,7 +615,7 @@ class _SensorCapabilities(_AlexaEntity): yield _AlexaTemperatureSensor(self.entity) -class _Cause(object): +class _Cause: """Possible causes for property changes. https://developer.amazon.com/docs/smarthome/state-reporting-for-a-smart-home-skill.html#cause-object diff --git a/homeassistant/components/amcrest.py b/homeassistant/components/amcrest.py index 820ca41ad2e..bcd0c38c3bd 100644 --- a/homeassistant/components/amcrest.py +++ b/homeassistant/components/amcrest.py @@ -164,7 +164,7 @@ def setup(hass, config): return True -class AmcrestDevice(object): +class AmcrestDevice: """Representation of a base Amcrest discovery device.""" def __init__(self, camera, name, authentication, ffmpeg_arguments, diff --git a/homeassistant/components/apcupsd.py b/homeassistant/components/apcupsd.py index 7e2b4cda28f..8808cee79a3 100644 --- a/homeassistant/components/apcupsd.py +++ b/homeassistant/components/apcupsd.py @@ -58,7 +58,7 @@ def setup(hass, config): return True -class APCUPSdData(object): +class APCUPSdData: """Stores the data retrieved from APCUPSd. For each entity to use, acts as the single point responsible for fetching diff --git a/homeassistant/components/arduino.py b/homeassistant/components/arduino.py index 8625685c057..785f8c57f94 100644 --- a/homeassistant/components/arduino.py +++ b/homeassistant/components/arduino.py @@ -62,7 +62,7 @@ def setup(hass, config): return True -class ArduinoBoard(object): +class ArduinoBoard: """Representation of an Arduino board.""" def __init__(self, port): diff --git a/homeassistant/components/asterisk_mbox.py b/homeassistant/components/asterisk_mbox.py index 0b5e7c1e1d7..e273d7d6f6a 100644 --- a/homeassistant/components/asterisk_mbox.py +++ b/homeassistant/components/asterisk_mbox.py @@ -48,7 +48,7 @@ def setup(hass, config): return True -class AsteriskData(object): +class AsteriskData: """Store Asterisk mailbox data.""" def __init__(self, hass, host, port, password): diff --git a/homeassistant/components/binary_sensor/arest.py b/homeassistant/components/binary_sensor/arest.py index 73751ef14bb..0366f753ba6 100644 --- a/homeassistant/components/binary_sensor/arest.py +++ b/homeassistant/components/binary_sensor/arest.py @@ -89,7 +89,7 @@ class ArestBinarySensor(BinarySensorDevice): self.arest.update() -class ArestData(object): +class ArestData: """Class for handling the data retrieval for pins.""" def __init__(self, resource, pin): diff --git a/homeassistant/components/binary_sensor/aurora.py b/homeassistant/components/binary_sensor/aurora.py index 772792f5785..0c33877854f 100644 --- a/homeassistant/components/binary_sensor/aurora.py +++ b/homeassistant/components/binary_sensor/aurora.py @@ -99,7 +99,7 @@ class AuroraSensor(BinarySensorDevice): self.aurora_data.update() -class AuroraData(object): +class AuroraData: """Get aurora forecast.""" def __init__(self, latitude, longitude, threshold): diff --git a/homeassistant/components/binary_sensor/hikvision.py b/homeassistant/components/binary_sensor/hikvision.py index f9ff4ac0a7a..de6ad8223d7 100644 --- a/homeassistant/components/binary_sensor/hikvision.py +++ b/homeassistant/components/binary_sensor/hikvision.py @@ -117,7 +117,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): add_entities(entities) -class HikvisionData(object): +class HikvisionData: """Hikvision device event stream object.""" def __init__(self, hass, url, port, name, username, password): diff --git a/homeassistant/components/binary_sensor/iss.py b/homeassistant/components/binary_sensor/iss.py index d35c36a012e..d0654317248 100644 --- a/homeassistant/components/binary_sensor/iss.py +++ b/homeassistant/components/binary_sensor/iss.py @@ -101,7 +101,7 @@ class IssBinarySensor(BinarySensorDevice): self.iss_data.update() -class IssData(object): +class IssData: """Get data from the ISS API.""" def __init__(self, latitude, longitude): diff --git a/homeassistant/components/binary_sensor/ping.py b/homeassistant/components/binary_sensor/ping.py index 0830d86dc2a..bb597f208e6 100644 --- a/homeassistant/components/binary_sensor/ping.py +++ b/homeassistant/components/binary_sensor/ping.py @@ -96,7 +96,7 @@ class PingBinarySensor(BinarySensorDevice): self.ping.update() -class PingData(object): +class PingData: """The Class for handling the data retrieval.""" def __init__(self, host, count): diff --git a/homeassistant/components/binary_sensor/tapsaff.py b/homeassistant/components/binary_sensor/tapsaff.py index c0f6ca3f112..5b8e133b5f4 100644 --- a/homeassistant/components/binary_sensor/tapsaff.py +++ b/homeassistant/components/binary_sensor/tapsaff.py @@ -63,7 +63,7 @@ class TapsAffSensor(BinarySensorDevice): self.data.update() -class TapsAffData(object): +class TapsAffData: """Class for handling the data retrieval for pins.""" def __init__(self, location): diff --git a/homeassistant/components/binary_sensor/zwave.py b/homeassistant/components/binary_sensor/zwave.py index fc18648f907..784a96d8615 100644 --- a/homeassistant/components/binary_sensor/zwave.py +++ b/homeassistant/components/binary_sensor/zwave.py @@ -10,7 +10,7 @@ import homeassistant.util.dt as dt_util from homeassistant.helpers.event import track_point_in_time from homeassistant.components import zwave from homeassistant.components.zwave import workaround -from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import from homeassistant.components.binary_sensor import ( DOMAIN, BinarySensorDevice) diff --git a/homeassistant/components/blink.py b/homeassistant/components/blink.py index a44f0163787..e84643711eb 100644 --- a/homeassistant/components/blink.py +++ b/homeassistant/components/blink.py @@ -40,7 +40,7 @@ SNAP_PICTURE_SCHEMA = vol.Schema({ }) -class BlinkSystem(object): +class BlinkSystem: """Blink System class.""" def __init__(self, config_info): diff --git a/homeassistant/components/bloomsky.py b/homeassistant/components/bloomsky.py index bc9d3acf54f..00377b3f12b 100644 --- a/homeassistant/components/bloomsky.py +++ b/homeassistant/components/bloomsky.py @@ -50,7 +50,7 @@ def setup(hass, config): return True -class BloomSky(object): +class BloomSky: """Handle all communication with the BloomSky API.""" # API documentation at http://weatherlution.com/bloomsky-api/ diff --git a/homeassistant/components/bmw_connected_drive/__init__.py b/homeassistant/components/bmw_connected_drive/__init__.py index a7ed262ac2c..061b09c1b3b 100644 --- a/homeassistant/components/bmw_connected_drive/__init__.py +++ b/homeassistant/components/bmw_connected_drive/__init__.py @@ -118,7 +118,7 @@ def setup_account(account_config: dict, hass, name: str) \ return cd_account -class BMWConnectedDriveAccount(object): +class BMWConnectedDriveAccount: """Representation of a BMW vehicle.""" def __init__(self, username: str, password: str, region_str: str, diff --git a/homeassistant/components/calendar/caldav.py b/homeassistant/components/calendar/caldav.py index 9c30d1481f8..3db24790aaf 100644 --- a/homeassistant/components/calendar/caldav.py +++ b/homeassistant/components/calendar/caldav.py @@ -125,7 +125,7 @@ class WebDavCalendarEventDevice(CalendarEventDevice): return await self.data.async_get_events(hass, start_date, end_date) -class WebDavCalendarData(object): +class WebDavCalendarData: """Class to utilize the calendar dav client object to get next event.""" def __init__(self, calendar, include_all_day, search): diff --git a/homeassistant/components/calendar/demo.py b/homeassistant/components/calendar/demo.py index 53129d3316c..0bf09f6f2c7 100644 --- a/homeassistant/components/calendar/demo.py +++ b/homeassistant/components/calendar/demo.py @@ -28,7 +28,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): ]) -class DemoGoogleCalendarData(object): +class DemoGoogleCalendarData: """Representation of a Demo Calendar element.""" event = {} diff --git a/homeassistant/components/calendar/google.py b/homeassistant/components/calendar/google.py index 279fb1e2694..925bbcacddf 100644 --- a/homeassistant/components/calendar/google.py +++ b/homeassistant/components/calendar/google.py @@ -55,7 +55,7 @@ class GoogleCalendarEventDevice(CalendarEventDevice): return await self.data.async_get_events(hass, start_date, end_date) -class GoogleCalendarData(object): +class GoogleCalendarData: """Class to utilize calendar service object to get next event.""" def __init__(self, calendar_service, calendar_id, search, diff --git a/homeassistant/components/calendar/todoist.py b/homeassistant/components/calendar/todoist.py index 42ab7b01c63..ba1f60027ba 100644 --- a/homeassistant/components/calendar/todoist.py +++ b/homeassistant/components/calendar/todoist.py @@ -280,7 +280,7 @@ class TodoistProjectDevice(CalendarEventDevice): return attributes -class TodoistProjectData(object): +class TodoistProjectData: """ Class used by the Task Device service object to hold all Todoist Tasks. diff --git a/homeassistant/components/canary.py b/homeassistant/components/canary.py index 4d0fbe617b2..04c33d83f3d 100644 --- a/homeassistant/components/canary.py +++ b/homeassistant/components/canary.py @@ -65,7 +65,7 @@ def setup(hass, config): return True -class CanaryData(object): +class CanaryData: """Get the latest data and update the states.""" def __init__(self, username, password, timeout): diff --git a/homeassistant/components/climate/netatmo.py b/homeassistant/components/climate/netatmo.py index a4b921037db..431834151fd 100644 --- a/homeassistant/components/climate/netatmo.py +++ b/homeassistant/components/climate/netatmo.py @@ -140,7 +140,7 @@ class NetatmoThermostat(ClimateDevice): self._away = self._data.setpoint_mode == 'away' -class ThermostatData(object): +class ThermostatData: """Get the latest data from Netatmo.""" def __init__(self, auth, device=None): diff --git a/homeassistant/components/climate/zwave.py b/homeassistant/components/climate/zwave.py index 52c544256b6..b1dcacb5654 100644 --- a/homeassistant/components/climate/zwave.py +++ b/homeassistant/components/climate/zwave.py @@ -11,7 +11,7 @@ from homeassistant.components.climate import ( SUPPORT_TARGET_TEMPERATURE, SUPPORT_FAN_MODE, SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE) from homeassistant.components.zwave import ZWaveDeviceEntity -from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import from homeassistant.const import ( STATE_OFF, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE) diff --git a/homeassistant/components/coinbase.py b/homeassistant/components/coinbase.py index c40bd99b542..154320b4abd 100644 --- a/homeassistant/components/coinbase.py +++ b/homeassistant/components/coinbase.py @@ -69,7 +69,7 @@ def setup(hass, config): return True -class CoinbaseData(object): +class CoinbaseData: """Get the latest data and update the states.""" def __init__(self, api_key, api_secret): diff --git a/homeassistant/components/comfoconnect.py b/homeassistant/components/comfoconnect.py index 425ed6f9c9a..69d88274f29 100644 --- a/homeassistant/components/comfoconnect.py +++ b/homeassistant/components/comfoconnect.py @@ -88,7 +88,7 @@ def setup(hass, config): return True -class ComfoConnectBridge(object): +class ComfoConnectBridge: """Representation of a ComfoConnect bridge.""" def __init__(self, hass, bridge, name, token, friendly_name, pin): diff --git a/homeassistant/components/configurator.py b/homeassistant/components/configurator.py index 2c159633a9b..56fb7b4247b 100644 --- a/homeassistant/components/configurator.py +++ b/homeassistant/components/configurator.py @@ -128,7 +128,7 @@ def async_setup(hass, config): return True -class Configurator(object): +class Configurator: """The class to keep track of current configuration requests.""" def __init__(self, hass): diff --git a/homeassistant/components/cover/zwave.py b/homeassistant/components/cover/zwave.py index c29c11c5b6b..d5de8863543 100644 --- a/homeassistant/components/cover/zwave.py +++ b/homeassistant/components/cover/zwave.py @@ -11,7 +11,7 @@ from homeassistant.components.cover import ( DOMAIN, SUPPORT_OPEN, SUPPORT_CLOSE, ATTR_POSITION) from homeassistant.components.zwave import ZWaveDeviceEntity from homeassistant.components import zwave -from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import from homeassistant.components.zwave import workaround from homeassistant.components.cover import CoverDevice diff --git a/homeassistant/components/daikin.py b/homeassistant/components/daikin.py index 5808528ca5a..8983ecf82d8 100644 --- a/homeassistant/components/daikin.py +++ b/homeassistant/components/daikin.py @@ -115,7 +115,7 @@ def daikin_api_setup(hass, host, name=None): return api -class DaikinApi(object): +class DaikinApi: """Keep the Daikin instance in one place and centralize the update.""" def __init__(self, device, name): diff --git a/homeassistant/components/deconz/__init__.py b/homeassistant/components/deconz/__init__.py index 88174b9d612..414d4b0766c 100644 --- a/homeassistant/components/deconz/__init__.py +++ b/homeassistant/components/deconz/__init__.py @@ -178,7 +178,7 @@ async def async_unload_entry(hass, config_entry): return True -class DeconzEvent(object): +class DeconzEvent: """When you want signals instead of entities. Stateless sensors such as remotes are expected to generate an event diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index b95a0a9d73b..391f36ad623 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -231,7 +231,7 @@ def async_setup(hass: HomeAssistantType, config: ConfigType): return True -class DeviceTracker(object): +class DeviceTracker: """Representation of a device tracker.""" def __init__(self, hass: HomeAssistantType, consider_home: timedelta, @@ -577,7 +577,7 @@ class Device(Entity): state.attributes[ATTR_LONGITUDE]) -class DeviceScanner(object): +class DeviceScanner: """Device scanner object.""" hass = None # type: HomeAssistantType diff --git a/homeassistant/components/device_tracker/automatic.py b/homeassistant/components/device_tracker/automatic.py index 607f236f920..4fcc550d7db 100644 --- a/homeassistant/components/device_tracker/automatic.py +++ b/homeassistant/components/device_tracker/automatic.py @@ -193,7 +193,7 @@ class AutomaticAuthCallbackView(HomeAssistantView): return response -class AutomaticData(object): +class AutomaticData: """A class representing an Automatic cloud service connection.""" def __init__(self, hass, client, session, devices, async_see): diff --git a/homeassistant/components/device_tracker/bmw_connected_drive.py b/homeassistant/components/device_tracker/bmw_connected_drive.py index f36afc622ee..02a12653180 100644 --- a/homeassistant/components/device_tracker/bmw_connected_drive.py +++ b/homeassistant/components/device_tracker/bmw_connected_drive.py @@ -27,7 +27,7 @@ def setup_scanner(hass, config, see, discovery_info=None): return True -class BMWDeviceTracker(object): +class BMWDeviceTracker: """BMW Connected Drive device tracker.""" def __init__(self, see, vehicle): diff --git a/homeassistant/components/device_tracker/freebox.py b/homeassistant/components/device_tracker/freebox.py index b278c421925..2cac81fd405 100644 --- a/homeassistant/components/device_tracker/freebox.py +++ b/homeassistant/components/device_tracker/freebox.py @@ -62,7 +62,7 @@ def _build_device(device_dict): device_dict['l3connectivities'][0]['addr']) -class FreeboxDeviceScanner(object): +class FreeboxDeviceScanner: """This class scans for devices connected to the Freebox.""" def __init__(self, hass, config, async_see): diff --git a/homeassistant/components/device_tracker/google_maps.py b/homeassistant/components/device_tracker/google_maps.py index 5f06946fc44..d0669ab4967 100644 --- a/homeassistant/components/device_tracker/google_maps.py +++ b/homeassistant/components/device_tracker/google_maps.py @@ -42,7 +42,7 @@ def setup_scanner(hass, config: ConfigType, see, discovery_info=None): return scanner.success_init -class GoogleMapsScanner(object): +class GoogleMapsScanner: """Representation of an Google Maps location sharing account.""" def __init__(self, hass, config: ConfigType, see) -> None: diff --git a/homeassistant/components/device_tracker/ping.py b/homeassistant/components/device_tracker/ping.py index 6a0cb18d55e..d09e1930d4f 100644 --- a/homeassistant/components/device_tracker/ping.py +++ b/homeassistant/components/device_tracker/ping.py @@ -28,7 +28,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ }) -class Host(object): +class Host: """Host object with ping detection.""" def __init__(self, ip_address, dev_id, hass, config): diff --git a/homeassistant/components/device_tracker/tesla.py b/homeassistant/components/device_tracker/tesla.py index ba9bc8c2631..c08ddb4047b 100644 --- a/homeassistant/components/device_tracker/tesla.py +++ b/homeassistant/components/device_tracker/tesla.py @@ -23,7 +23,7 @@ def setup_scanner(hass, config, see, discovery_info=None): return True -class TeslaDeviceTracker(object): +class TeslaDeviceTracker: """A class representing a Tesla device.""" def __init__(self, hass, config, see, tesla_devices): diff --git a/homeassistant/components/device_tracker/tile.py b/homeassistant/components/device_tracker/tile.py index 6df9f3c9974..526c1a4b47b 100644 --- a/homeassistant/components/device_tracker/tile.py +++ b/homeassistant/components/device_tracker/tile.py @@ -74,7 +74,7 @@ async def async_setup_scanner(hass, config, async_see, discovery_info=None): return await scanner.async_init() -class TileScanner(object): +class TileScanner: """Define an object to retrieve Tile data.""" def __init__(self, client, hass, async_see, types, show_inactive): diff --git a/homeassistant/components/device_tracker/trackr.py b/homeassistant/components/device_tracker/trackr.py index 84fb449c070..08d3a4c9445 100644 --- a/homeassistant/components/device_tracker/trackr.py +++ b/homeassistant/components/device_tracker/trackr.py @@ -30,7 +30,7 @@ def setup_scanner(hass, config: dict, see, discovery_info=None): return True -class TrackRDeviceScanner(object): +class TrackRDeviceScanner: """A class representing a TrackR device.""" def __init__(self, hass, config: dict, see) -> None: diff --git a/homeassistant/components/dialogflow.py b/homeassistant/components/dialogflow.py index 28b3a05e403..0f275a7fe66 100644 --- a/homeassistant/components/dialogflow.py +++ b/homeassistant/components/dialogflow.py @@ -119,7 +119,7 @@ async def async_handle_message(hass, message): return dialogflow_response.as_dict() -class DialogflowResponse(object): +class DialogflowResponse: """Help generating the response for Dialogflow.""" def __init__(self, parameters): diff --git a/homeassistant/components/digital_ocean.py b/homeassistant/components/digital_ocean.py index a0f50842649..c0c9d95586c 100644 --- a/homeassistant/components/digital_ocean.py +++ b/homeassistant/components/digital_ocean.py @@ -65,7 +65,7 @@ def setup(hass, config): return True -class DigitalOcean(object): +class DigitalOcean: """Handle all communication with the Digital Ocean API.""" def __init__(self, access_token): diff --git a/homeassistant/components/ecobee.py b/homeassistant/components/ecobee.py index 96f094b527d..3829c2caebd 100644 --- a/homeassistant/components/ecobee.py +++ b/homeassistant/components/ecobee.py @@ -84,7 +84,7 @@ def setup_ecobee(hass, network, config): discovery.load_platform(hass, 'weather', DOMAIN, {}, config) -class EcobeeData(object): +class EcobeeData: """Get the latest data and update the states.""" def __init__(self, config_file): diff --git a/homeassistant/components/emulated_hue/__init__.py b/homeassistant/components/emulated_hue/__init__.py index 36ce1c392f9..8a67b933b9f 100644 --- a/homeassistant/components/emulated_hue/__init__.py +++ b/homeassistant/components/emulated_hue/__init__.py @@ -136,7 +136,7 @@ def setup(hass, yaml_config): return True -class Config(object): +class Config: """Hold configuration variables for the emulated hue bridge.""" def __init__(self, hass, conf): diff --git a/homeassistant/components/fan/zwave.py b/homeassistant/components/fan/zwave.py index 364306ff8dd..645cb033e13 100644 --- a/homeassistant/components/fan/zwave.py +++ b/homeassistant/components/fan/zwave.py @@ -11,7 +11,7 @@ from homeassistant.components.fan import ( DOMAIN, FanEntity, SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH, SUPPORT_SET_SPEED) from homeassistant.components import zwave -from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/feedreader.py b/homeassistant/components/feedreader.py index 56f153517cf..782fd8ac8dd 100644 --- a/homeassistant/components/feedreader.py +++ b/homeassistant/components/feedreader.py @@ -53,7 +53,7 @@ def setup(hass, config): return len(feeds) > 0 -class FeedManager(object): +class FeedManager: """Abstraction over Feedparser module.""" def __init__(self, url, scan_interval, max_entries, hass, storage): @@ -170,7 +170,7 @@ class FeedManager(object): self._firstrun = False -class StoredData(object): +class StoredData: """Abstraction over pickle data storage.""" def __init__(self, data_file): diff --git a/homeassistant/components/ffmpeg.py b/homeassistant/components/ffmpeg.py index e083affe92b..9aaae16ee21 100644 --- a/homeassistant/components/ffmpeg.py +++ b/homeassistant/components/ffmpeg.py @@ -116,7 +116,7 @@ def async_setup(hass, config): return True -class FFmpegManager(object): +class FFmpegManager: """Helper for ha-ffmpeg.""" def __init__(self, hass, ffmpeg_bin, run_test): diff --git a/homeassistant/components/gc100.py b/homeassistant/components/gc100.py index 25bcb5b0f79..0d4b19da030 100644 --- a/homeassistant/components/gc100.py +++ b/homeassistant/components/gc100.py @@ -53,7 +53,7 @@ def setup(hass, base_config): return True -class GC100Device(object): +class GC100Device: """The GC100 component.""" def __init__(self, hass, gc_device): diff --git a/homeassistant/components/google.py b/homeassistant/components/google.py index fdbc3382072..e37b3ba7ff7 100644 --- a/homeassistant/components/google.py +++ b/homeassistant/components/google.py @@ -231,7 +231,7 @@ def do_setup(hass, config): return True -class GoogleCalendarService(object): +class GoogleCalendarService: """Calendar service interface to Google.""" def __init__(self, token_file): diff --git a/homeassistant/components/hassio/handler.py b/homeassistant/components/hassio/handler.py index c3caf40ba62..5410cb9ec1a 100644 --- a/homeassistant/components/hassio/handler.py +++ b/homeassistant/components/hassio/handler.py @@ -45,7 +45,7 @@ def _api_data(funct): return _wrapper -class HassIO(object): +class HassIO: """Small API wrapper for Hass.io.""" def __init__(self, loop, websession, ip): diff --git a/homeassistant/components/history.py b/homeassistant/components/history.py index 7ee1c70487f..21d4cdc6e56 100644 --- a/homeassistant/components/history.py +++ b/homeassistant/components/history.py @@ -353,7 +353,7 @@ class HistoryPeriodView(HomeAssistantView): return await hass.async_add_job(self.json, result) -class Filters(object): +class Filters: """Container for the configured include and exclude filters.""" def __init__(self): diff --git a/homeassistant/components/homematicip_cloud/hap.py b/homeassistant/components/homematicip_cloud/hap.py index a4e3e78e860..57bb9488ee8 100644 --- a/homeassistant/components/homematicip_cloud/hap.py +++ b/homeassistant/components/homematicip_cloud/hap.py @@ -14,7 +14,7 @@ from .errors import HmipcConnectionError _LOGGER = logging.getLogger(__name__) -class HomematicipAuth(object): +class HomematicipAuth: """Manages HomematicIP client registration.""" def __init__(self, hass, config): @@ -73,7 +73,7 @@ class HomematicipAuth(object): return auth -class HomematicipHAP(object): +class HomematicipHAP: """Manages HomematicIP http and websocket connection.""" def __init__(self, hass, config_entry): diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 0cbee628a8a..42629f752ad 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -152,7 +152,7 @@ async def async_setup(hass, config): return True -class HomeAssistantHTTP(object): +class HomeAssistantHTTP: """HTTP server for Home Assistant.""" def __init__(self, hass, api_password, diff --git a/homeassistant/components/http/ban.py b/homeassistant/components/http/ban.py index fe8b7db84d1..7bb5194b1ec 100644 --- a/homeassistant/components/http/ban.py +++ b/homeassistant/components/http/ban.py @@ -107,7 +107,7 @@ async def process_wrong_login(request): 'Banning IP address', NOTIFICATION_ID_BAN) -class IpBan(object): +class IpBan: """Represents banned IP address.""" def __init__(self, ip_ban: str, banned_at: datetime = None) -> None: diff --git a/homeassistant/components/http/view.py b/homeassistant/components/http/view.py index 23698af8101..34b72e9ed69 100644 --- a/homeassistant/components/http/view.py +++ b/homeassistant/components/http/view.py @@ -21,7 +21,7 @@ from .const import KEY_AUTHENTICATED, KEY_REAL_IP _LOGGER = logging.getLogger(__name__) -class HomeAssistantView(object): +class HomeAssistantView: """Base view for all views.""" url = None diff --git a/homeassistant/components/hue/bridge.py b/homeassistant/components/hue/bridge.py index 8710b2561b0..f528de462ef 100644 --- a/homeassistant/components/hue/bridge.py +++ b/homeassistant/components/hue/bridge.py @@ -19,7 +19,7 @@ SCENE_SCHEMA = vol.Schema({ }) -class HueBridge(object): +class HueBridge: """Manages a single Hue bridge.""" def __init__(self, hass, config_entry, allow_unreachable, allow_groups): diff --git a/homeassistant/components/hydrawise.py b/homeassistant/components/hydrawise.py index a60e3d5b8fc..0c4db63034e 100644 --- a/homeassistant/components/hydrawise.py +++ b/homeassistant/components/hydrawise.py @@ -101,7 +101,7 @@ def setup(hass, config): return True -class HydrawiseHub(object): +class HydrawiseHub: """Representation of a base Hydrawise device.""" def __init__(self, data): diff --git a/homeassistant/components/insteon_plm/__init__.py b/homeassistant/components/insteon_plm/__init__.py index ef631223894..7845b47e218 100644 --- a/homeassistant/components/insteon_plm/__init__.py +++ b/homeassistant/components/insteon_plm/__init__.py @@ -316,7 +316,7 @@ def async_setup(hass, config): State = collections.namedtuple('Product', 'stateType platform') -class IPDB(object): +class IPDB: """Embodies the INSTEON Product Database static data and access methods.""" def __init__(self): diff --git a/homeassistant/components/keyboard_remote.py b/homeassistant/components/keyboard_remote.py index bbd7bc44082..9a7cc7caecb 100644 --- a/homeassistant/components/keyboard_remote.py +++ b/homeassistant/components/keyboard_remote.py @@ -163,7 +163,7 @@ class KeyboardRemoteThread(threading.Thread): ) -class KeyboardRemote(object): +class KeyboardRemote: """Sets up one thread per device.""" def __init__(self, hass, config): diff --git a/homeassistant/components/knx.py b/homeassistant/components/knx.py index 61f8ca90137..f8db21118ec 100644 --- a/homeassistant/components/knx.py +++ b/homeassistant/components/knx.py @@ -129,7 +129,7 @@ def _get_devices(hass, discovery_type): hass.data[DATA_KNX].xknx.devices))) -class KNXModule(object): +class KNXModule: """Representation of KNX Object.""" def __init__(self, hass, config): @@ -284,7 +284,7 @@ class KNXAutomation(): device.actions.append(self.action) -class KNXExposeTime(object): +class KNXExposeTime: """Object to Expose Time/Date object to KNX bus.""" def __init__(self, xknx, expose_type, address): @@ -308,7 +308,7 @@ class KNXExposeTime(object): self.xknx.devices.add(self.device) -class KNXExposeSensor(object): +class KNXExposeSensor: """Object to Expose HASS entity to KNX bus.""" def __init__(self, hass, xknx, expose_type, entity_id, address): diff --git a/homeassistant/components/konnected.py b/homeassistant/components/konnected.py index 26fe356d772..a3e9ff86ed0 100644 --- a/homeassistant/components/konnected.py +++ b/homeassistant/components/konnected.py @@ -114,7 +114,7 @@ async def async_setup(hass, config): return True -class KonnectedDevice(object): +class KonnectedDevice: """A representation of a single Konnected device.""" def __init__(self, hass, host, port, config): diff --git a/homeassistant/components/light/greenwave.py b/homeassistant/components/light/greenwave.py index 8e9d93657ce..52a70532005 100644 --- a/homeassistant/components/light/greenwave.py +++ b/homeassistant/components/light/greenwave.py @@ -121,7 +121,7 @@ class GreenwaveLight(Light): self._name = bulbs[self._did]['name'] -class GatewayData(object): +class GatewayData: """Handle Gateway data and limit updates.""" def __init__(self, host, token): diff --git a/homeassistant/components/light/lifx.py b/homeassistant/components/light/lifx.py index 9b2c183c1d1..3738fd8f004 100644 --- a/homeassistant/components/light/lifx.py +++ b/homeassistant/components/light/lifx.py @@ -204,7 +204,7 @@ def merge_hsbk(base, change): return [b if c is None else c for b, c in zip(base, change)] -class LIFXManager(object): +class LIFXManager: """Representation of all known LIFX entities.""" def __init__(self, hass, async_add_devices): diff --git a/homeassistant/components/light/lifx_legacy.py b/homeassistant/components/light/lifx_legacy.py index 182d7536dc4..3ad75a1cea4 100644 --- a/homeassistant/components/light/lifx_legacy.py +++ b/homeassistant/components/light/lifx_legacy.py @@ -58,7 +58,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): lifx_library.probe() -class LIFX(object): +class LIFX: """Representation of a LIFX light.""" def __init__(self, add_devices_callback, server_addr=None, diff --git a/homeassistant/components/light/zwave.py b/homeassistant/components/light/zwave.py index f468e8c25ef..55feef496f8 100644 --- a/homeassistant/components/light/zwave.py +++ b/homeassistant/components/light/zwave.py @@ -12,7 +12,7 @@ from homeassistant.components.light import ( ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, SUPPORT_COLOR, SUPPORT_TRANSITION, SUPPORT_WHITE_VALUE, DOMAIN, Light) from homeassistant.components import zwave -from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import from homeassistant.const import STATE_OFF, STATE_ON import homeassistant.util.color as color_util diff --git a/homeassistant/components/linode.py b/homeassistant/components/linode.py index 962e30774b8..c98ef16c7ed 100644 --- a/homeassistant/components/linode.py +++ b/homeassistant/components/linode.py @@ -62,7 +62,7 @@ def setup(hass, config): return True -class Linode(object): +class Linode: """Handle all communication with the Linode API.""" def __init__(self, access_token): diff --git a/homeassistant/components/logbook.py b/homeassistant/components/logbook.py index eb2e8391221..b9970e3466e 100644 --- a/homeassistant/components/logbook.py +++ b/homeassistant/components/logbook.py @@ -140,7 +140,7 @@ class LogbookView(HomeAssistantView): return await hass.async_add_job(json_events) -class Entry(object): +class Entry: """A human readable version of the log.""" def __init__(self, when=None, name=None, message=None, domain=None, diff --git a/homeassistant/components/mailbox/__init__.py b/homeassistant/components/mailbox/__init__.py index 8ff3746889e..6a648e4dc47 100644 --- a/homeassistant/components/mailbox/__init__.py +++ b/homeassistant/components/mailbox/__init__.py @@ -132,7 +132,7 @@ class MailboxEntity(Entity): self.message_count = len(messages) -class Mailbox(object): +class Mailbox: """Represent a mailbox device.""" def __init__(self, hass, name): diff --git a/homeassistant/components/matrix.py b/homeassistant/components/matrix.py index b2805c994e8..5f6c30aaeba 100644 --- a/homeassistant/components/matrix.py +++ b/homeassistant/components/matrix.py @@ -96,7 +96,7 @@ def setup(hass, config): return True -class MatrixBot(object): +class MatrixBot: """The Matrix Bot.""" def __init__(self, hass, config_file, homeserver, verify_ssl, diff --git a/homeassistant/components/maxcube.py b/homeassistant/components/maxcube.py index bca7a1b4ab7..b574f0bcb15 100644 --- a/homeassistant/components/maxcube.py +++ b/homeassistant/components/maxcube.py @@ -79,7 +79,7 @@ def setup(hass, config): return True -class MaxCubeHandle(object): +class MaxCubeHandle: """Keep the cube instance in one place and centralize the update.""" def __init__(self, cube, scan_interval): diff --git a/homeassistant/components/media_extractor.py b/homeassistant/components/media_extractor.py index 21accdf84b3..2ecee06d8a3 100644 --- a/homeassistant/components/media_extractor.py +++ b/homeassistant/components/media_extractor.py @@ -58,7 +58,7 @@ class MEQueryException(Exception): pass -class MediaExtractor(object): +class MediaExtractor: """Class which encapsulates all extraction logic.""" def __init__(self, hass, component_config, call_data): diff --git a/homeassistant/components/media_player/cast.py b/homeassistant/components/media_player/cast.py index 4e24d5f2f71..32ceadf248f 100644 --- a/homeassistant/components/media_player/cast.py +++ b/homeassistant/components/media_player/cast.py @@ -63,7 +63,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ @attr.s(slots=True, frozen=True) -class ChromecastInfo(object): +class ChromecastInfo: """Class to hold all data about a chromecast for creating connections. This also has the same attributes as the mDNS fields by zeroconf. @@ -258,7 +258,7 @@ async def _async_setup_platform(hass: HomeAssistantType, config: ConfigType, hass.async_add_job(_discover_chromecast, hass, info) -class CastStatusListener(object): +class CastStatusListener: """Helper class to handle pychromecast status callbacks. Necessary because a CastDevice entity can create a new socket client diff --git a/homeassistant/components/media_player/firetv.py b/homeassistant/components/media_player/firetv.py index 280a84f0828..979aec57c74 100644 --- a/homeassistant/components/media_player/firetv.py +++ b/homeassistant/components/media_player/firetv.py @@ -68,7 +68,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): _LOGGER.error("Could not connect to firetv-server at %s", host) -class FireTV(object): +class FireTV: """The firetv-server client. Should a native Python 3 ADB module become available, python-firetv can diff --git a/homeassistant/components/media_player/itunes.py b/homeassistant/components/media_player/itunes.py index ca0979f1752..e5f7a2f9432 100644 --- a/homeassistant/components/media_player/itunes.py +++ b/homeassistant/components/media_player/itunes.py @@ -41,7 +41,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ }) -class Itunes(object): +class Itunes: """The iTunes API client.""" def __init__(self, host, port, use_ssl): diff --git a/homeassistant/components/media_player/squeezebox.py b/homeassistant/components/media_player/squeezebox.py index 371ad890364..8eb4c85f6b2 100644 --- a/homeassistant/components/media_player/squeezebox.py +++ b/homeassistant/components/media_player/squeezebox.py @@ -143,7 +143,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): return True -class LogitechMediaServer(object): +class LogitechMediaServer: """Representation of a Logitech media server.""" def __init__(self, hass, host, port, username, password): diff --git a/homeassistant/components/microsoft_face.py b/homeassistant/components/microsoft_face.py index 847f4131f43..e0e0e716d2e 100644 --- a/homeassistant/components/microsoft_face.py +++ b/homeassistant/components/microsoft_face.py @@ -289,7 +289,7 @@ class MicrosoftFaceGroupEntity(Entity): return attr -class MicrosoftFace(object): +class MicrosoftFace: """Microsoft Face api for HomeAssistant.""" def __init__(self, hass, server_loc, api_key, timeout, entities): diff --git a/homeassistant/components/mochad.py b/homeassistant/components/mochad.py index 9f53f84e020..7e6738b95f8 100644 --- a/homeassistant/components/mochad.py +++ b/homeassistant/components/mochad.py @@ -61,7 +61,7 @@ def setup(hass, config): return True -class MochadCtrl(object): +class MochadCtrl: """Mochad controller.""" def __init__(self, host, port): diff --git a/homeassistant/components/modbus.py b/homeassistant/components/modbus.py index fc6db96e029..f484cb31a6c 100644 --- a/homeassistant/components/modbus.py +++ b/homeassistant/components/modbus.py @@ -157,7 +157,7 @@ def setup(hass, config): return True -class ModbusHub(object): +class ModbusHub: """Thread safe wrapper class for pymodbus.""" def __init__(self, modbus_client): diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 55d99a0817e..3928eb945aa 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -462,7 +462,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: @attr.s(slots=True, frozen=True) -class Subscription(object): +class Subscription: """Class to hold data about an active subscription.""" topic = attr.ib(type=str) @@ -472,7 +472,7 @@ class Subscription(object): @attr.s(slots=True, frozen=True) -class Message(object): +class Message: """MQTT Message.""" topic = attr.ib(type=str) @@ -481,7 +481,7 @@ class Message(object): retain = attr.ib(type=bool, default=False) -class MQTT(object): +class MQTT: """Home Assistant MQTT client.""" def __init__(self, hass: HomeAssistantType, broker: str, port: int, diff --git a/homeassistant/components/mychevy.py b/homeassistant/components/mychevy.py index 3531c6b4919..292e56418fc 100644 --- a/homeassistant/components/mychevy.py +++ b/homeassistant/components/mychevy.py @@ -41,7 +41,7 @@ CONFIG_SCHEMA = vol.Schema({ }, extra=vol.ALLOW_EXTRA) -class EVSensorConfig(object): +class EVSensorConfig: """The EV sensor configuration.""" def __init__(self, name, attr, unit_of_measurement=None, icon=None): @@ -52,7 +52,7 @@ class EVSensorConfig(object): self.icon = icon -class EVBinarySensorConfig(object): +class EVBinarySensorConfig: """The EV binary sensor configuration.""" def __init__(self, name, attr, device_class=None): diff --git a/homeassistant/components/mysensors/device.py b/homeassistant/components/mysensors/device.py index b0770f90c1d..3ae99f61d17 100644 --- a/homeassistant/components/mysensors/device.py +++ b/homeassistant/components/mysensors/device.py @@ -25,7 +25,7 @@ def get_mysensors_devices(hass, domain): return hass.data[MYSENSORS_PLATFORM_DEVICES.format(domain)] -class MySensorsDevice(object): +class MySensorsDevice: """Representation of a MySensors device.""" def __init__(self, gateway, node_id, child_id, name, value_type): diff --git a/homeassistant/components/neato.py b/homeassistant/components/neato.py index 63b0f61bb7c..6eabfc713bc 100644 --- a/homeassistant/components/neato.py +++ b/homeassistant/components/neato.py @@ -118,7 +118,7 @@ def setup(hass, config): return True -class NeatoHub(object): +class NeatoHub: """A My Neato hub wrapper class.""" def __init__(self, hass, domain_config, neato): diff --git a/homeassistant/components/nest/__init__.py b/homeassistant/components/nest/__init__.py index 58fa1953ef0..23a331b21b2 100644 --- a/homeassistant/components/nest/__init__.py +++ b/homeassistant/components/nest/__init__.py @@ -183,7 +183,7 @@ async def async_setup_entry(hass, entry): return True -class NestDevice(object): +class NestDevice: """Structure Nest functions for hass.""" def __init__(self, hass, conf, nest): diff --git a/homeassistant/components/netatmo.py b/homeassistant/components/netatmo.py index b1c7a650843..c25b57fbd62 100644 --- a/homeassistant/components/netatmo.py +++ b/homeassistant/components/netatmo.py @@ -64,7 +64,7 @@ def setup(hass, config): return True -class CameraData(object): +class CameraData: """Get the latest data from Netatmo.""" def __init__(self, auth, home=None): diff --git a/homeassistant/components/notify/__init__.py b/homeassistant/components/notify/__init__.py index 41198d1f296..13cd6203ed4 100644 --- a/homeassistant/components/notify/__init__.py +++ b/homeassistant/components/notify/__init__.py @@ -174,7 +174,7 @@ def async_setup(hass, config): return True -class BaseNotificationService(object): +class BaseNotificationService: """An abstract class for notification services.""" hass = None diff --git a/homeassistant/components/notify/apns.py b/homeassistant/components/notify/apns.py index 9cca81e1485..8fabfc3aefb 100644 --- a/homeassistant/components/notify/apns.py +++ b/homeassistant/components/notify/apns.py @@ -56,7 +56,7 @@ def get_service(hass, config, discovery_info=None): return service -class ApnsDevice(object): +class ApnsDevice: """ The APNS Device class. diff --git a/homeassistant/components/nuimo_controller.py b/homeassistant/components/nuimo_controller.py index e7ab86a5f35..0f8fbb39073 100644 --- a/homeassistant/components/nuimo_controller.py +++ b/homeassistant/components/nuimo_controller.py @@ -52,7 +52,7 @@ def setup(hass, config): return True -class NuimoLogger(object): +class NuimoLogger: """Handle Nuimo Controller event callbacks.""" def __init__(self, hass, name): @@ -167,7 +167,7 @@ HOMEASSIST_LOGO = ( ".........") -class DiscoveryLogger(object): +class DiscoveryLogger: """Handle Nuimo Discovery callbacks.""" # pylint: disable=no-self-use diff --git a/homeassistant/components/octoprint.py b/homeassistant/components/octoprint.py index c1059227f7a..bc936265f6f 100644 --- a/homeassistant/components/octoprint.py +++ b/homeassistant/components/octoprint.py @@ -50,7 +50,7 @@ def setup(hass, config): return True -class OctoPrintAPI(object): +class OctoPrintAPI: """Simple JSON wrapper for OctoPrint's API.""" def __init__(self, api_url, key, bed, number_of_tools): diff --git a/homeassistant/components/pilight.py b/homeassistant/components/pilight.py index 344c750c0ec..d307a428e0e 100644 --- a/homeassistant/components/pilight.py +++ b/homeassistant/components/pilight.py @@ -118,7 +118,7 @@ def setup(hass, config): return True -class CallRateDelayThrottle(object): +class CallRateDelayThrottle: """Helper class to provide service call rate throttling. This class provides a decorator to decorate service methods that need diff --git a/homeassistant/components/plant.py b/homeassistant/components/plant.py index 048851e97f5..84dc8402742 100644 --- a/homeassistant/components/plant.py +++ b/homeassistant/components/plant.py @@ -324,7 +324,7 @@ class Plant(Entity): return attrib -class DailyHistory(object): +class DailyHistory: """Stores one measurement per day for a maximum number of days. At the moment only the maximum value per day is kept. diff --git a/homeassistant/components/prometheus.py b/homeassistant/components/prometheus.py index 0a6c959f243..da986f024a4 100644 --- a/homeassistant/components/prometheus.py +++ b/homeassistant/components/prometheus.py @@ -55,7 +55,7 @@ def setup(hass, config): return True -class PrometheusMetrics(object): +class PrometheusMetrics: """Model all of the metrics which should be exposed to Prometheus.""" def __init__(self, prometheus_client, entity_filter, namespace): diff --git a/homeassistant/components/rachio.py b/homeassistant/components/rachio.py index 3a804c50c74..90854efe8b1 100644 --- a/homeassistant/components/rachio.py +++ b/homeassistant/components/rachio.py @@ -130,7 +130,7 @@ def setup(hass, config) -> bool: return True -class RachioPerson(object): +class RachioPerson: """Represent a Rachio user.""" def __init__(self, hass, rachio): @@ -162,7 +162,7 @@ class RachioPerson(object): return self._controllers -class RachioIro(object): +class RachioIro: """Represent a Rachio Iro.""" def __init__(self, hass, rachio, data): diff --git a/homeassistant/components/raincloud.py b/homeassistant/components/raincloud.py index a04f4926b76..53cd8e79d7e 100644 --- a/homeassistant/components/raincloud.py +++ b/homeassistant/components/raincloud.py @@ -124,7 +124,7 @@ def setup(hass, config): return True -class RainCloudHub(object): +class RainCloudHub: """Representation of a base RainCloud device.""" def __init__(self, data): diff --git a/homeassistant/components/rainmachine/__init__.py b/homeassistant/components/rainmachine/__init__.py index 22fc427ccce..b6546f2e67b 100644 --- a/homeassistant/components/rainmachine/__init__.py +++ b/homeassistant/components/rainmachine/__init__.py @@ -201,7 +201,7 @@ async def async_setup(hass, config): return True -class RainMachine(object): +class RainMachine: """Define a generic RainMachine object.""" def __init__(self, client): diff --git a/homeassistant/components/raspihats.py b/homeassistant/components/raspihats.py index 41480c09a32..f43263bf4bf 100644 --- a/homeassistant/components/raspihats.py +++ b/homeassistant/components/raspihats.py @@ -63,7 +63,7 @@ class I2CHatsException(Exception): """I2C-HATs exception.""" -class I2CHatsDIScanner(object): +class I2CHatsDIScanner: """Scan Digital Inputs and fire callbacks.""" _DIGITAL_INPUTS = "di" diff --git a/homeassistant/components/remember_the_milk/__init__.py b/homeassistant/components/remember_the_milk/__init__.py index 98cd937de3c..a94e8e95c6f 100644 --- a/homeassistant/components/remember_the_milk/__init__.py +++ b/homeassistant/components/remember_the_milk/__init__.py @@ -138,7 +138,7 @@ def _register_new_account(hass, account_name, api_key, shared_secret, ) -class RememberTheMilkConfiguration(object): +class RememberTheMilkConfiguration: """Internal configuration data for RememberTheMilk class. This class stores the authentication token it get from the backend. diff --git a/homeassistant/components/scsgate.py b/homeassistant/components/scsgate.py index a7193b40949..dcea69cbb48 100644 --- a/homeassistant/components/scsgate.py +++ b/homeassistant/components/scsgate.py @@ -60,7 +60,7 @@ def setup(hass, config): return True -class SCSGate(object): +class SCSGate: """The class for dealing with the SCSGate device via scsgate.Reactor.""" def __init__(self, device, logger): diff --git a/homeassistant/components/sensor/airvisual.py b/homeassistant/components/sensor/airvisual.py index 0002274833f..403722c7b6a 100644 --- a/homeassistant/components/sensor/airvisual.py +++ b/homeassistant/components/sensor/airvisual.py @@ -248,7 +248,7 @@ class AirVisualSensor(Entity): }) -class AirVisualData(object): +class AirVisualData: """Define an object to hold sensor data.""" def __init__(self, client, **kwargs): diff --git a/homeassistant/components/sensor/arest.py b/homeassistant/components/sensor/arest.py index 19860ba84fd..751f0f11171 100644 --- a/homeassistant/components/sensor/arest.py +++ b/homeassistant/components/sensor/arest.py @@ -158,7 +158,7 @@ class ArestSensor(Entity): return self.arest.available -class ArestData(object): +class ArestData: """The Class for handling the data retrieval for variables.""" def __init__(self, resource, pin=None): diff --git a/homeassistant/components/sensor/bbox.py b/homeassistant/components/sensor/bbox.py index 3689e94b05d..d24621becc9 100644 --- a/homeassistant/components/sensor/bbox.py +++ b/homeassistant/components/sensor/bbox.py @@ -125,7 +125,7 @@ class BboxSensor(Entity): 2) -class BboxData(object): +class BboxData: """Get data from the Bbox.""" def __init__(self): diff --git a/homeassistant/components/sensor/bitcoin.py b/homeassistant/components/sensor/bitcoin.py index bd23b9850f7..f51b7dcd5bd 100644 --- a/homeassistant/components/sensor/bitcoin.py +++ b/homeassistant/components/sensor/bitcoin.py @@ -169,7 +169,7 @@ class BitcoinSensor(Entity): self._state = '{0:.2f}'.format(stats.market_price_usd) -class BitcoinData(object): +class BitcoinData: """Get the latest data and update the states.""" def __init__(self): diff --git a/homeassistant/components/sensor/bom.py b/homeassistant/components/sensor/bom.py index 5cec528d26a..eb63e116254 100644 --- a/homeassistant/components/sensor/bom.py +++ b/homeassistant/components/sensor/bom.py @@ -180,7 +180,7 @@ class BOMCurrentSensor(Entity): self.bom_data.update() -class BOMCurrentData(object): +class BOMCurrentData: """Get data from BOM.""" def __init__(self, hass, station_id): diff --git a/homeassistant/components/sensor/broadlink.py b/homeassistant/components/sensor/broadlink.py index 8806fae5974..06d7f512c9f 100644 --- a/homeassistant/components/sensor/broadlink.py +++ b/homeassistant/components/sensor/broadlink.py @@ -96,7 +96,7 @@ class BroadlinkSensor(Entity): self._state = self._broadlink_data.data[self._type] -class BroadlinkData(object): +class BroadlinkData: """Representation of a Broadlink data object.""" def __init__(self, interval, ip_addr, mac_addr, timeout): diff --git a/homeassistant/components/sensor/buienradar.py b/homeassistant/components/sensor/buienradar.py index 10a96ded437..e366a83a65d 100644 --- a/homeassistant/components/sensor/buienradar.py +++ b/homeassistant/components/sensor/buienradar.py @@ -374,7 +374,7 @@ class BrSensor(Entity): return self._force_update -class BrData(object): +class BrData: """Get the latest data and updates the states.""" def __init__(self, hass, coordinates, timeframe, devices): diff --git a/homeassistant/components/sensor/coinmarketcap.py b/homeassistant/components/sensor/coinmarketcap.py index f4b666f1e5c..c4f38b1be02 100644 --- a/homeassistant/components/sensor/coinmarketcap.py +++ b/homeassistant/components/sensor/coinmarketcap.py @@ -140,7 +140,7 @@ class CoinMarketCapSensor(Entity): self._ticker = self.data.ticker.get('data') -class CoinMarketCapData(object): +class CoinMarketCapData: """Get the latest data and update the states.""" def __init__(self, currency_id, display_currency): diff --git a/homeassistant/components/sensor/command_line.py b/homeassistant/components/sensor/command_line.py index 2003b1b41c9..1db7c58d328 100644 --- a/homeassistant/components/sensor/command_line.py +++ b/homeassistant/components/sensor/command_line.py @@ -95,7 +95,7 @@ class CommandSensor(Entity): self._state = value -class CommandSensorData(object): +class CommandSensorData: """The class for handling the data retrieval.""" def __init__(self, hass, command, command_timeout): diff --git a/homeassistant/components/sensor/cups.py b/homeassistant/components/sensor/cups.py index 6d55853d724..846b109afca 100644 --- a/homeassistant/components/sensor/cups.py +++ b/homeassistant/components/sensor/cups.py @@ -129,7 +129,7 @@ class CupsSensor(Entity): # pylint: disable=no-name-in-module -class CupsData(object): +class CupsData: """Get the latest data from CUPS and update the state.""" def __init__(self, host, port): diff --git a/homeassistant/components/sensor/currencylayer.py b/homeassistant/components/sensor/currencylayer.py index f5d6f278da0..0834bbc99d8 100644 --- a/homeassistant/components/sensor/currencylayer.py +++ b/homeassistant/components/sensor/currencylayer.py @@ -104,7 +104,7 @@ class CurrencylayerSensor(Entity): value['{}{}'.format(self._base, self._quote)], 4) -class CurrencylayerData(object): +class CurrencylayerData: """Get data from Currencylayer.org.""" def __init__(self, resource, parameters): diff --git a/homeassistant/components/sensor/darksky.py b/homeassistant/components/sensor/darksky.py index e75f36d59f7..2e57e1bd447 100644 --- a/homeassistant/components/sensor/darksky.py +++ b/homeassistant/components/sensor/darksky.py @@ -372,7 +372,7 @@ def convert_to_camel(data): return components[0] + "".join(x.title() for x in components[1:]) -class DarkSkyData(object): +class DarkSkyData: """Get the latest data from Darksky.""" def __init__(self, api_key, latitude, longitude, units, language, diff --git a/homeassistant/components/sensor/deutsche_bahn.py b/homeassistant/components/sensor/deutsche_bahn.py index ec9b14883a9..0e6ab164d4f 100644 --- a/homeassistant/components/sensor/deutsche_bahn.py +++ b/homeassistant/components/sensor/deutsche_bahn.py @@ -85,7 +85,7 @@ class DeutscheBahnSensor(Entity): self._state += " + {}".format(self.data.connections[0]['delay']) -class SchieneData(object): +class SchieneData: """Pull data from the bahn.de web page.""" def __init__(self, start, goal, only_direct): diff --git a/homeassistant/components/sensor/dht.py b/homeassistant/components/sensor/dht.py index c5c26bc5ffa..6770594b919 100644 --- a/homeassistant/components/sensor/dht.py +++ b/homeassistant/components/sensor/dht.py @@ -140,7 +140,7 @@ class DHTSensor(Entity): self._state = round(humidity + humidity_offset, 1) -class DHTClient(object): +class DHTClient: """Get the latest data from the DHT sensor.""" def __init__(self, adafruit_dht, sensor, pin): diff --git a/homeassistant/components/sensor/dublin_bus_transport.py b/homeassistant/components/sensor/dublin_bus_transport.py index f6d791f9fd6..a443c78b2b1 100644 --- a/homeassistant/components/sensor/dublin_bus_transport.py +++ b/homeassistant/components/sensor/dublin_bus_transport.py @@ -125,7 +125,7 @@ class DublinPublicTransportSensor(Entity): pass -class PublicTransportData(object): +class PublicTransportData: """The Class for handling the data retrieval.""" def __init__(self, stop, route): diff --git a/homeassistant/components/sensor/dwd_weather_warnings.py b/homeassistant/components/sensor/dwd_weather_warnings.py index e023dfcc49f..4f9664617a3 100644 --- a/homeassistant/components/sensor/dwd_weather_warnings.py +++ b/homeassistant/components/sensor/dwd_weather_warnings.py @@ -163,7 +163,7 @@ class DwdWeatherWarningsSensor(Entity): self._api.update() -class DwdWeatherWarningsAPI(object): +class DwdWeatherWarningsAPI: """Get the latest data and update the states.""" def __init__(self, region_name): diff --git a/homeassistant/components/sensor/dweet.py b/homeassistant/components/sensor/dweet.py index cca06bd9782..065c88d8332 100644 --- a/homeassistant/components/sensor/dweet.py +++ b/homeassistant/components/sensor/dweet.py @@ -99,7 +99,7 @@ class DweetSensor(Entity): values, STATE_UNKNOWN) -class DweetData(object): +class DweetData: """The class for handling the data retrieval.""" def __init__(self, device): diff --git a/homeassistant/components/sensor/ebox.py b/homeassistant/components/sensor/ebox.py index d7b867081a3..218968ecee8 100644 --- a/homeassistant/components/sensor/ebox.py +++ b/homeassistant/components/sensor/ebox.py @@ -129,7 +129,7 @@ class EBoxSensor(Entity): self._state = round(self.ebox_data.data[self.type], 2) -class EBoxData(object): +class EBoxData: """Get data from Ebox.""" def __init__(self, username, password, httpsession): diff --git a/homeassistant/components/sensor/eddystone_temperature.py b/homeassistant/components/sensor/eddystone_temperature.py index 978b8db669a..4c209d17d07 100644 --- a/homeassistant/components/sensor/eddystone_temperature.py +++ b/homeassistant/components/sensor/eddystone_temperature.py @@ -120,7 +120,7 @@ class EddystoneTemp(Entity): return False -class Monitor(object): +class Monitor: """Continuously scan for BLE advertisements.""" def __init__(self, hass, devices, bt_device_id): diff --git a/homeassistant/components/sensor/emoncms.py b/homeassistant/components/sensor/emoncms.py index cd02137f4d5..a62eaba7df8 100644 --- a/homeassistant/components/sensor/emoncms.py +++ b/homeassistant/components/sensor/emoncms.py @@ -190,7 +190,7 @@ class EmonCmsSensor(Entity): self._state = round(float(elem["value"]), DECIMALS) -class EmonCmsData(object): +class EmonCmsData: """The class for handling the data retrieval.""" def __init__(self, hass, url, apikey, interval): diff --git a/homeassistant/components/sensor/envirophat.py b/homeassistant/components/sensor/envirophat.py index 265350f3e95..bf4ee55c446 100644 --- a/homeassistant/components/sensor/envirophat.py +++ b/homeassistant/components/sensor/envirophat.py @@ -138,7 +138,7 @@ class EnvirophatSensor(Entity): self._state = self.data.voltage_3 -class EnvirophatData(object): +class EnvirophatData: """Get the latest data and update.""" def __init__(self, envirophat, use_leds): diff --git a/homeassistant/components/sensor/fail2ban.py b/homeassistant/components/sensor/fail2ban.py index 87c301d34f5..bf868d49201 100644 --- a/homeassistant/components/sensor/fail2ban.py +++ b/homeassistant/components/sensor/fail2ban.py @@ -112,7 +112,7 @@ class BanSensor(Entity): self.last_ban = 'None' -class BanLogParser(object): +class BanLogParser: """Class to parse fail2ban logs.""" def __init__(self, interval, log_file): diff --git a/homeassistant/components/sensor/fastdotcom.py b/homeassistant/components/sensor/fastdotcom.py index 9143ccaf23f..65474cd4bf6 100644 --- a/homeassistant/components/sensor/fastdotcom.py +++ b/homeassistant/components/sensor/fastdotcom.py @@ -102,7 +102,7 @@ class SpeedtestSensor(Entity): return ICON -class SpeedtestData(object): +class SpeedtestData: """Get the latest data from fast.com.""" def __init__(self, hass, config): diff --git a/homeassistant/components/sensor/fido.py b/homeassistant/components/sensor/fido.py index a2ee18b3659..4f724b5b851 100644 --- a/homeassistant/components/sensor/fido.py +++ b/homeassistant/components/sensor/fido.py @@ -147,7 +147,7 @@ class FidoSensor(Entity): self._state = round(self._state, 2) -class FidoData(object): +class FidoData: """Get data from Fido.""" def __init__(self, username, password, httpsession): diff --git a/homeassistant/components/sensor/filter.py b/homeassistant/components/sensor/filter.py index df913ab6d80..15059b08a17 100644 --- a/homeassistant/components/sensor/filter.py +++ b/homeassistant/components/sensor/filter.py @@ -258,7 +258,7 @@ class SensorFilter(Entity): return state_attr -class FilterState(object): +class FilterState: """State abstraction for filter usage.""" def __init__(self, state): @@ -283,7 +283,7 @@ class FilterState(object): return "{} : {}".format(self.timestamp, self.state) -class Filter(object): +class Filter: """Filter skeleton. Args: diff --git a/homeassistant/components/sensor/fints.py b/homeassistant/components/sensor/fints.py index 13129919139..ef064e84228 100644 --- a/homeassistant/components/sensor/fints.py +++ b/homeassistant/components/sensor/fints.py @@ -101,7 +101,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices(accounts, True) -class FinTsClient(object): +class FinTsClient: """Wrapper around the FinTS3PinTanClient. Use this class as Context Manager to get the FinTS3Client object. diff --git a/homeassistant/components/sensor/fixer.py b/homeassistant/components/sensor/fixer.py index 438366ae555..5a6f8da79b2 100644 --- a/homeassistant/components/sensor/fixer.py +++ b/homeassistant/components/sensor/fixer.py @@ -102,7 +102,7 @@ class ExchangeRateSensor(Entity): self._state = round(self.data.rate['rates'][self._target], 3) -class ExchangeData(object): +class ExchangeData: """Get the latest data and update the states.""" def __init__(self, target_currency, api_key): diff --git a/homeassistant/components/sensor/fritzbox_callmonitor.py b/homeassistant/components/sensor/fritzbox_callmonitor.py index 304489f99b7..e42be861d37 100644 --- a/homeassistant/components/sensor/fritzbox_callmonitor.py +++ b/homeassistant/components/sensor/fritzbox_callmonitor.py @@ -143,7 +143,7 @@ class FritzBoxCallSensor(Entity): self.phonebook.update_phonebook() -class FritzBoxCallMonitor(object): +class FritzBoxCallMonitor: """Event listener to monitor calls on the Fritz!Box.""" def __init__(self, host, port, sensor): @@ -225,7 +225,7 @@ class FritzBoxCallMonitor(object): self._sensor.schedule_update_ha_state() -class FritzBoxPhonebook(object): +class FritzBoxPhonebook: """This connects to a FritzBox router and downloads its phone book.""" def __init__(self, host, port, username, password, diff --git a/homeassistant/components/sensor/geizhals.py b/homeassistant/components/sensor/geizhals.py index 94f3f1884d1..9e32bf27c29 100644 --- a/homeassistant/components/sensor/geizhals.py +++ b/homeassistant/components/sensor/geizhals.py @@ -98,7 +98,7 @@ class Geizwatch(Entity): self._state = self.data.prices[0] -class GeizParser(object): +class GeizParser: """Pull data from the geizhals website.""" def __init__(self, product_id, domain, regex): diff --git a/homeassistant/components/sensor/geo_rss_events.py b/homeassistant/components/sensor/geo_rss_events.py index c8c4db17c8d..b79e6e69adf 100644 --- a/homeassistant/components/sensor/geo_rss_events.py +++ b/homeassistant/components/sensor/geo_rss_events.py @@ -149,7 +149,7 @@ class GeoRssServiceSensor(Entity): self._state_attributes = matrix -class GeoRssServiceData(object): +class GeoRssServiceData: """Provide access to GeoRSS feed and stores the latest data.""" def __init__(self, home_latitude, home_longitude, url, radius_in_km): diff --git a/homeassistant/components/sensor/glances.py b/homeassistant/components/sensor/glances.py index bd6e91c7b53..a6dfd89e45a 100644 --- a/homeassistant/components/sensor/glances.py +++ b/homeassistant/components/sensor/glances.py @@ -176,7 +176,7 @@ class GlancesSensor(Entity): self._state = round(use / 1024**2, 1) -class GlancesData(object): +class GlancesData: """The class for handling the data retrieval.""" def __init__(self, resource): diff --git a/homeassistant/components/sensor/google_wifi.py b/homeassistant/components/sensor/google_wifi.py index 388af9b3ce7..cc5461ed548 100644 --- a/homeassistant/components/sensor/google_wifi.py +++ b/homeassistant/components/sensor/google_wifi.py @@ -138,7 +138,7 @@ class GoogleWifiSensor(Entity): self._state = STATE_UNKNOWN -class GoogleWifiAPI(object): +class GoogleWifiAPI: """Get the latest data and update the states.""" def __init__(self, host, conditions): diff --git a/homeassistant/components/sensor/haveibeenpwned.py b/homeassistant/components/sensor/haveibeenpwned.py index c1fe7ab4880..bc79c4d0c1d 100644 --- a/homeassistant/components/sensor/haveibeenpwned.py +++ b/homeassistant/components/sensor/haveibeenpwned.py @@ -122,7 +122,7 @@ class HaveIBeenPwnedSensor(Entity): self._state = len(self._data.data[self._email]) -class HaveIBeenPwnedData(object): +class HaveIBeenPwnedData: """Class for handling the data retrieval.""" def __init__(self, emails): diff --git a/homeassistant/components/sensor/hddtemp.py b/homeassistant/components/sensor/hddtemp.py index 006542a777f..f8afe9c7637 100644 --- a/homeassistant/components/sensor/hddtemp.py +++ b/homeassistant/components/sensor/hddtemp.py @@ -108,7 +108,7 @@ class HddTempSensor(Entity): self._state = None -class HddTempData(object): +class HddTempData: """Get the latest data from HDDTemp and update the states.""" def __init__(self, host, port): diff --git a/homeassistant/components/sensor/hp_ilo.py b/homeassistant/components/sensor/hp_ilo.py index acd10fe08af..98ee83f8958 100644 --- a/homeassistant/components/sensor/hp_ilo.py +++ b/homeassistant/components/sensor/hp_ilo.py @@ -147,7 +147,7 @@ class HpIloSensor(Entity): self._state = ilo_data -class HpIloData(object): +class HpIloData: """Gets the latest data from HP ILO.""" def __init__(self, host, port, login, password): diff --git a/homeassistant/components/sensor/hydroquebec.py b/homeassistant/components/sensor/hydroquebec.py index 2195153ab1e..db75d51fbad 100644 --- a/homeassistant/components/sensor/hydroquebec.py +++ b/homeassistant/components/sensor/hydroquebec.py @@ -162,7 +162,7 @@ class HydroQuebecSensor(Entity): self._state = round(self.hydroquebec_data.data[self.type], 2) -class HydroquebecData(object): +class HydroquebecData: """Get data from HydroQuebec.""" def __init__(self, username, password, httpsession, contract=None): diff --git a/homeassistant/components/sensor/imap_email_content.py b/homeassistant/components/sensor/imap_email_content.py index c0c9bf62efd..a1a604df3e4 100644 --- a/homeassistant/components/sensor/imap_email_content.py +++ b/homeassistant/components/sensor/imap_email_content.py @@ -58,7 +58,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): return False -class EmailReader(object): +class EmailReader: """A class to read emails from an IMAP server.""" def __init__(self, user, password, server, port): diff --git a/homeassistant/components/sensor/influxdb.py b/homeassistant/components/sensor/influxdb.py index c0d492984e0..8bfbaf49837 100644 --- a/homeassistant/components/sensor/influxdb.py +++ b/homeassistant/components/sensor/influxdb.py @@ -155,7 +155,7 @@ class InfluxSensor(Entity): self._state = value -class InfluxSensorData(object): +class InfluxSensorData: """Class for handling the data retrieval.""" def __init__(self, influx, group, field, measurement, where): diff --git a/homeassistant/components/sensor/irish_rail_transport.py b/homeassistant/components/sensor/irish_rail_transport.py index 603d82359de..5febebeec87 100644 --- a/homeassistant/components/sensor/irish_rail_transport.py +++ b/homeassistant/components/sensor/irish_rail_transport.py @@ -132,7 +132,7 @@ class IrishRailTransportSensor(Entity): self._state = None -class IrishRailTransportData(object): +class IrishRailTransportData: """The Class for handling the data retrieval.""" def __init__(self, irish_rail, station, direction, destination, stops_at): diff --git a/homeassistant/components/sensor/london_air.py b/homeassistant/components/sensor/london_air.py index 2ffbb914275..bbb5993b064 100644 --- a/homeassistant/components/sensor/london_air.py +++ b/homeassistant/components/sensor/london_air.py @@ -71,7 +71,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices(sensors, True) -class APIData(object): +class APIData: """Get the latest data for all authorities.""" def __init__(self): diff --git a/homeassistant/components/sensor/london_underground.py b/homeassistant/components/sensor/london_underground.py index fe13c0db8a7..4619eda0611 100644 --- a/homeassistant/components/sensor/london_underground.py +++ b/homeassistant/components/sensor/london_underground.py @@ -95,7 +95,7 @@ class LondonTubeSensor(Entity): self._description = self._data.data[self.name]['Description'] -class TubeData(object): +class TubeData: """Get the latest tube data from TFL.""" def __init__(self): diff --git a/homeassistant/components/sensor/luftdaten.py b/homeassistant/components/sensor/luftdaten.py index 9952e2a1c24..c9bc7205ce6 100644 --- a/homeassistant/components/sensor/luftdaten.py +++ b/homeassistant/components/sensor/luftdaten.py @@ -137,7 +137,7 @@ class LuftdatenSensor(Entity): await self.luftdaten.async_update() -class LuftdatenData(object): +class LuftdatenData: """Class for handling the data retrieval.""" def __init__(self, data): diff --git a/homeassistant/components/sensor/lyft.py b/homeassistant/components/sensor/lyft.py index c2f6412049c..57e5f1c6b02 100644 --- a/homeassistant/components/sensor/lyft.py +++ b/homeassistant/components/sensor/lyft.py @@ -183,7 +183,7 @@ class LyftSensor(Entity): estimate.get('estimated_cost_cents_max', 0)) / 2) / 100) -class LyftEstimate(object): +class LyftEstimate: """The class for handling the time and price estimate.""" def __init__(self, session, start_latitude, start_longitude, diff --git a/homeassistant/components/sensor/metoffice.py b/homeassistant/components/sensor/metoffice.py index b6366de6432..ec3d3f47ba7 100644 --- a/homeassistant/components/sensor/metoffice.py +++ b/homeassistant/components/sensor/metoffice.py @@ -174,7 +174,7 @@ class MetOfficeCurrentSensor(Entity): self.data.update() -class MetOfficeCurrentData(object): +class MetOfficeCurrentData: """Get data from Datapoint.""" def __init__(self, hass, datapoint, site): diff --git a/homeassistant/components/sensor/mhz19.py b/homeassistant/components/sensor/mhz19.py index cd559d3bbd2..60f6598ab21 100644 --- a/homeassistant/components/sensor/mhz19.py +++ b/homeassistant/components/sensor/mhz19.py @@ -117,7 +117,7 @@ class MHZ19Sensor(Entity): return result -class MHZClient(object): +class MHZClient: """Get the latest data from the MH-Z sensor.""" def __init__(self, co2sensor, serial): diff --git a/homeassistant/components/sensor/mopar.py b/homeassistant/components/sensor/mopar.py index 3e1887cfd59..81c48555cfc 100644 --- a/homeassistant/components/sensor/mopar.py +++ b/homeassistant/components/sensor/mopar.py @@ -70,7 +70,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): for index, _ in enumerate(data.vehicles)], True) -class MoparData(object): +class MoparData: """Container for Mopar vehicle data. Prevents session expiry re-login race condition. diff --git a/homeassistant/components/sensor/mvglive.py b/homeassistant/components/sensor/mvglive.py index 81c7173e4d0..95f2845eced 100644 --- a/homeassistant/components/sensor/mvglive.py +++ b/homeassistant/components/sensor/mvglive.py @@ -123,7 +123,7 @@ class MVGLiveSensor(Entity): self._icon = ICONS[self.data.departures.get('product', '-')] -class MVGLiveData(object): +class MVGLiveData: """Pull data from the mvg-live.de web page.""" def __init__(self, station, destinations, directions, diff --git a/homeassistant/components/sensor/netatmo.py b/homeassistant/components/sensor/netatmo.py index 54b095bb84b..bc0cbc5eea6 100644 --- a/homeassistant/components/sensor/netatmo.py +++ b/homeassistant/components/sensor/netatmo.py @@ -287,7 +287,7 @@ class NetAtmoSensor(Entity): self._state = "Full" -class NetAtmoData(object): +class NetAtmoData: """Get the latest data from NetAtmo.""" def __init__(self, auth, station): diff --git a/homeassistant/components/sensor/netdata.py b/homeassistant/components/sensor/netdata.py index 2d08159967c..488b1611399 100644 --- a/homeassistant/components/sensor/netdata.py +++ b/homeassistant/components/sensor/netdata.py @@ -134,7 +134,7 @@ class NetdataSensor(Entity): resource_data['dimensions'][self._element]['value'], 2) -class NetdataData(object): +class NetdataData: """The class for handling the data retrieval.""" def __init__(self, api): diff --git a/homeassistant/components/sensor/neurio_energy.py b/homeassistant/components/sensor/neurio_energy.py index 5e3bf55dc9d..fd8b8d2aeec 100644 --- a/homeassistant/components/sensor/neurio_energy.py +++ b/homeassistant/components/sensor/neurio_energy.py @@ -69,7 +69,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices([NeurioEnergy(data, DAILY_NAME, DAILY_TYPE, update_daily)]) -class NeurioData(object): +class NeurioData: """Stores data retrieved from Neurio sensor.""" def __init__(self, api_key, api_secret, sensor_id): diff --git a/homeassistant/components/sensor/nsw_fuel_station.py b/homeassistant/components/sensor/nsw_fuel_station.py index 2440dac3204..5f677d39888 100644 --- a/homeassistant/components/sensor/nsw_fuel_station.py +++ b/homeassistant/components/sensor/nsw_fuel_station.py @@ -73,7 +73,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): ]) -class StationPriceData(object): +class StationPriceData: """An object to store and fetch the latest data for a given station.""" def __init__(self, client, station_id: int) -> None: diff --git a/homeassistant/components/sensor/nut.py b/homeassistant/components/sensor/nut.py index 7c7ff3480b0..ff0cd8ef891 100644 --- a/homeassistant/components/sensor/nut.py +++ b/homeassistant/components/sensor/nut.py @@ -260,7 +260,7 @@ class NUTSensor(Entity): self._state = self._data.status[self.type] -class PyNUTData(object): +class PyNUTData: """Stores the data retrieved from NUT. For each entity to use, acts as the single point responsible for fetching diff --git a/homeassistant/components/sensor/nzbget.py b/homeassistant/components/sensor/nzbget.py index 0fa6362ad05..a8dda416a54 100644 --- a/homeassistant/components/sensor/nzbget.py +++ b/homeassistant/components/sensor/nzbget.py @@ -138,7 +138,7 @@ class NZBGetSensor(Entity): self._state = value -class NZBGetAPI(object): +class NZBGetAPI: """Simple JSON-RPC wrapper for NZBGet's API.""" def __init__(self, api_url, username=None, password=None): diff --git a/homeassistant/components/sensor/openexchangerates.py b/homeassistant/components/sensor/openexchangerates.py index 741ffa2842d..5e8231bb124 100644 --- a/homeassistant/components/sensor/openexchangerates.py +++ b/homeassistant/components/sensor/openexchangerates.py @@ -93,7 +93,7 @@ class OpenexchangeratesSensor(Entity): self._state = round(value[str(self._quote)], 4) -class OpenexchangeratesData(object): +class OpenexchangeratesData: """Get data from Openexchangerates.org.""" def __init__(self, resource, parameters, quote): diff --git a/homeassistant/components/sensor/openhardwaremonitor.py b/homeassistant/components/sensor/openhardwaremonitor.py index 1b5867836bc..dc221f6b07d 100644 --- a/homeassistant/components/sensor/openhardwaremonitor.py +++ b/homeassistant/components/sensor/openhardwaremonitor.py @@ -108,7 +108,7 @@ class OpenHardwareMonitorDevice(Entity): }) -class OpenHardwareMonitorData(object): +class OpenHardwareMonitorData: """Class used to pull data from OHM and create sensors.""" def __init__(self, config, hass): diff --git a/homeassistant/components/sensor/openweathermap.py b/homeassistant/components/sensor/openweathermap.py index 96db4430d32..6241f3e5378 100644 --- a/homeassistant/components/sensor/openweathermap.py +++ b/homeassistant/components/sensor/openweathermap.py @@ -179,7 +179,7 @@ class OpenWeatherMapSensor(Entity): self._state = fc_data.get_weathers()[0].get_detailed_status() -class WeatherData(object): +class WeatherData: """Get the latest data from OpenWeatherMap.""" def __init__(self, owm, forecast, latitude, longitude): diff --git a/homeassistant/components/sensor/pi_hole.py b/homeassistant/components/sensor/pi_hole.py index 2adf5691e2e..363ada725ba 100644 --- a/homeassistant/components/sensor/pi_hole.py +++ b/homeassistant/components/sensor/pi_hole.py @@ -153,7 +153,7 @@ class PiHoleSensor(Entity): self.data = self.pi_hole.api.data -class PiHoleData(object): +class PiHoleData: """Get the latest data and update the states.""" def __init__(self, api): diff --git a/homeassistant/components/sensor/pollen.py b/homeassistant/components/sensor/pollen.py index c11c83ab40e..ea68a902c48 100644 --- a/homeassistant/components/sensor/pollen.py +++ b/homeassistant/components/sensor/pollen.py @@ -263,7 +263,7 @@ class PollencomSensor(Entity): self._state = average -class PollenComData(object): +class PollenComData: """Define a data object to retrieve info from Pollen.com.""" def __init__(self, client, sensor_types): diff --git a/homeassistant/components/sensor/pyload.py b/homeassistant/components/sensor/pyload.py index cc4ce1e6448..a5593c259a5 100644 --- a/homeassistant/components/sensor/pyload.py +++ b/homeassistant/components/sensor/pyload.py @@ -124,7 +124,7 @@ class PyLoadSensor(Entity): self._state = value -class PyLoadAPI(object): +class PyLoadAPI: """Simple wrapper for pyLoad's API.""" def __init__(self, api_url, username=None, password=None): diff --git a/homeassistant/components/sensor/qnap.py b/homeassistant/components/sensor/qnap.py index 97cf948ff9f..a44823d86ba 100644 --- a/homeassistant/components/sensor/qnap.py +++ b/homeassistant/components/sensor/qnap.py @@ -164,7 +164,7 @@ def round_nicely(number): return round(number) -class QNAPStatsAPI(object): +class QNAPStatsAPI: """Class to interface with the API.""" def __init__(self, config): diff --git a/homeassistant/components/sensor/rest.py b/homeassistant/components/sensor/rest.py index 75235bedaab..8db48719a37 100644 --- a/homeassistant/components/sensor/rest.py +++ b/homeassistant/components/sensor/rest.py @@ -158,7 +158,7 @@ class RestSensor(Entity): return self._attributes -class RestData(object): +class RestData: """Class for handling the data retrieval.""" def __init__(self, method, resource, auth, headers, data, verify_ssl): diff --git a/homeassistant/components/sensor/sense.py b/homeassistant/components/sensor/sense.py index 5eee9053db5..16f4ccb9b6c 100644 --- a/homeassistant/components/sensor/sense.py +++ b/homeassistant/components/sensor/sense.py @@ -27,7 +27,7 @@ CONSUMPTION_NAME = "Usage" ACTIVE_TYPE = 'active' -class SensorConfig(object): +class SensorConfig: """Data structure holding sensor config.""" def __init__(self, name, sensor_type): diff --git a/homeassistant/components/sensor/sensehat.py b/homeassistant/components/sensor/sensehat.py index a50f4cdfd2c..f0e566f718f 100644 --- a/homeassistant/components/sensor/sensehat.py +++ b/homeassistant/components/sensor/sensehat.py @@ -109,7 +109,7 @@ class SenseHatSensor(Entity): self._state = self.data.pressure -class SenseHatData(object): +class SenseHatData: """Get the latest data and update.""" def __init__(self, is_hat_attached): diff --git a/homeassistant/components/sensor/shodan.py b/homeassistant/components/sensor/shodan.py index bc3e127508b..541abea3091 100644 --- a/homeassistant/components/sensor/shodan.py +++ b/homeassistant/components/sensor/shodan.py @@ -96,7 +96,7 @@ class ShodanSensor(Entity): self._state = self.data.details['total'] -class ShodanData(object): +class ShodanData: """Get the latest data and update the states.""" def __init__(self, api, query): diff --git a/homeassistant/components/sensor/sht31.py b/homeassistant/components/sensor/sht31.py index e1a7f3c9e5f..2aeff8e73d8 100644 --- a/homeassistant/components/sensor/sht31.py +++ b/homeassistant/components/sensor/sht31.py @@ -75,7 +75,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices(devs) -class SHTClient(object): +class SHTClient: """Get the latest data from the SHT sensor.""" def __init__(self, adafruit_sht): diff --git a/homeassistant/components/sensor/sigfox.py b/homeassistant/components/sensor/sigfox.py index da8f3fcc639..408435a9667 100644 --- a/homeassistant/components/sensor/sigfox.py +++ b/homeassistant/components/sensor/sigfox.py @@ -55,7 +55,7 @@ def epoch_to_datetime(epoch_time): return datetime.datetime.fromtimestamp(epoch_time).isoformat() -class SigfoxAPI(object): +class SigfoxAPI: """Class for interacting with the SigFox API.""" def __init__(self, api_login, api_password): diff --git a/homeassistant/components/sensor/snmp.py b/homeassistant/components/sensor/snmp.py index 95bf207acf8..0ba74f0e7ed 100644 --- a/homeassistant/components/sensor/snmp.py +++ b/homeassistant/components/sensor/snmp.py @@ -131,7 +131,7 @@ class SnmpSensor(Entity): self._state = value -class SnmpData(object): +class SnmpData: """Get the latest data and update the states.""" def __init__(self, host, port, community, baseoid, version, accept_errors, diff --git a/homeassistant/components/sensor/speedtest.py b/homeassistant/components/sensor/speedtest.py index bf2868d3b01..8c1ffc03786 100644 --- a/homeassistant/components/sensor/speedtest.py +++ b/homeassistant/components/sensor/speedtest.py @@ -148,7 +148,7 @@ class SpeedtestSensor(Entity): self._state = state.state -class SpeedtestData(object): +class SpeedtestData: """Get the latest data from speedtest.net.""" def __init__(self, hass, config): diff --git a/homeassistant/components/sensor/startca.py b/homeassistant/components/sensor/startca.py index aefbc2d4626..374e14c5ac2 100644 --- a/homeassistant/components/sensor/startca.py +++ b/homeassistant/components/sensor/startca.py @@ -118,7 +118,7 @@ class StartcaSensor(Entity): self._state = round(self.startcadata.data[self.type], 2) -class StartcaData(object): +class StartcaData: """Get data from Start.ca API.""" def __init__(self, loop, websession, api_key, bandwidth_cap): diff --git a/homeassistant/components/sensor/swiss_hydrological_data.py b/homeassistant/components/sensor/swiss_hydrological_data.py index 63d500e2373..b4536b48c9e 100644 --- a/homeassistant/components/sensor/swiss_hydrological_data.py +++ b/homeassistant/components/sensor/swiss_hydrological_data.py @@ -145,7 +145,7 @@ class SwissHydrologicalDataSensor(Entity): self._state = self.data.measurings['03']['current'] -class HydrologicalData(object): +class HydrologicalData: """The Class for handling the data retrieval.""" def __init__(self, station): diff --git a/homeassistant/components/sensor/synologydsm.py b/homeassistant/components/sensor/synologydsm.py index e70dd482f1e..124cec97617 100644 --- a/homeassistant/components/sensor/synologydsm.py +++ b/homeassistant/components/sensor/synologydsm.py @@ -129,7 +129,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): hass.bus.listen_once(EVENT_HOMEASSISTANT_START, run_setup) -class SynoApi(object): +class SynoApi: """Class to interface with Synology DSM API.""" def __init__(self, host, port, username, password, temp_unit, use_ssl): diff --git a/homeassistant/components/sensor/sytadin.py b/homeassistant/components/sensor/sytadin.py index 9a85eb25575..6b2284f4376 100644 --- a/homeassistant/components/sensor/sytadin.py +++ b/homeassistant/components/sensor/sytadin.py @@ -113,7 +113,7 @@ class SytadinSensor(Entity): self._state = self.data.congestion -class SytadinData(object): +class SytadinData: """The class for handling the data retrieval.""" def __init__(self, resource): diff --git a/homeassistant/components/sensor/ted5000.py b/homeassistant/components/sensor/ted5000.py index c2ef1d4c6b9..7298181796a 100644 --- a/homeassistant/components/sensor/ted5000.py +++ b/homeassistant/components/sensor/ted5000.py @@ -88,7 +88,7 @@ class Ted5000Sensor(Entity): self._gateway.update() -class Ted5000Gateway(object): +class Ted5000Gateway: """The class for handling the data retrieval.""" def __init__(self, url): diff --git a/homeassistant/components/sensor/teksavvy.py b/homeassistant/components/sensor/teksavvy.py index 0bf1ef4caff..68a1cfc4fe1 100644 --- a/homeassistant/components/sensor/teksavvy.py +++ b/homeassistant/components/sensor/teksavvy.py @@ -119,7 +119,7 @@ class TekSavvySensor(Entity): self._state = round(self.teksavvydata.data[self.type], 2) -class TekSavvyData(object): +class TekSavvyData: """Get data from TekSavvy API.""" def __init__(self, loop, websession, api_key, bandwidth_cap): diff --git a/homeassistant/components/sensor/thethingsnetwork.py b/homeassistant/components/sensor/thethingsnetwork.py index 28a3b48892b..0f27b656404 100644 --- a/homeassistant/components/sensor/thethingsnetwork.py +++ b/homeassistant/components/sensor/thethingsnetwork.py @@ -110,7 +110,7 @@ class TtnDataSensor(Entity): self._state = self._ttn_data_storage.data -class TtnDataStorage(object): +class TtnDataStorage: """Get the latest data from The Things Network Data Storage.""" def __init__(self, hass, app_id, device_id, access_key, values): diff --git a/homeassistant/components/sensor/transmission.py b/homeassistant/components/sensor/transmission.py index 4dac411d224..3e74b454913 100644 --- a/homeassistant/components/sensor/transmission.py +++ b/homeassistant/components/sensor/transmission.py @@ -148,7 +148,7 @@ class TransmissionSensor(Entity): self._state = self._data.torrentCount -class TransmissionData(object): +class TransmissionData: """Get the latest data and update the states.""" def __init__(self, api): diff --git a/homeassistant/components/sensor/uber.py b/homeassistant/components/sensor/uber.py index e80fe7d2d82..cd476a1a226 100644 --- a/homeassistant/components/sensor/uber.py +++ b/homeassistant/components/sensor/uber.py @@ -175,7 +175,7 @@ class UberSensor(Entity): self._state = 0 -class UberEstimate(object): +class UberEstimate: """The class for handling the time and price estimate.""" def __init__(self, session, start_latitude, start_longitude, diff --git a/homeassistant/components/sensor/waterfurnace.py b/homeassistant/components/sensor/waterfurnace.py index 24c45ec1ff3..76c5d2f648e 100644 --- a/homeassistant/components/sensor/waterfurnace.py +++ b/homeassistant/components/sensor/waterfurnace.py @@ -16,7 +16,7 @@ from homeassistant.helpers.entity import Entity from homeassistant.util import slugify -class WFSensorConfig(object): +class WFSensorConfig: """Water Furnace Sensor configuration.""" def __init__(self, friendly_name, field, icon="mdi:gauge", diff --git a/homeassistant/components/sensor/wunderground.py b/homeassistant/components/sensor/wunderground.py index 7f2df4bcda9..24ae2d0068f 100644 --- a/homeassistant/components/sensor/wunderground.py +++ b/homeassistant/components/sensor/wunderground.py @@ -40,7 +40,7 @@ MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5) # Helper classes for declaring sensor configurations -class WUSensorConfig(object): +class WUSensorConfig: """WU Sensor Configuration. defines basic HA properties of the weather sensor and @@ -764,7 +764,7 @@ class WUndergroundSensor(Entity): return self._unique_id -class WUndergroundData(object): +class WUndergroundData: """Get data from WUnderground.""" def __init__(self, hass, api_key, pws_id, lang, latitude, longitude): diff --git a/homeassistant/components/sensor/yahoo_finance.py b/homeassistant/components/sensor/yahoo_finance.py index 8c2cfd9923f..82cb7f845dc 100644 --- a/homeassistant/components/sensor/yahoo_finance.py +++ b/homeassistant/components/sensor/yahoo_finance.py @@ -104,7 +104,7 @@ class YahooFinanceSensor(Entity): self._state = self.data.state -class YahooFinanceData(object): +class YahooFinanceData: """Get data from Yahoo Finance.""" def __init__(self, symbol): diff --git a/homeassistant/components/sensor/yr.py b/homeassistant/components/sensor/yr.py index c7ff967723b..fcddf41af97 100644 --- a/homeassistant/components/sensor/yr.py +++ b/homeassistant/components/sensor/yr.py @@ -142,7 +142,7 @@ class YrSensor(Entity): return self._unit_of_measurement -class YrData(object): +class YrData: """Get the latest data and updates the states.""" def __init__(self, hass, coordinates, forecast, devices): diff --git a/homeassistant/components/sensor/yweather.py b/homeassistant/components/sensor/yweather.py index db66419e54a..b2279e107da 100644 --- a/homeassistant/components/sensor/yweather.py +++ b/homeassistant/components/sensor/yweather.py @@ -174,7 +174,7 @@ class YahooWeatherSensor(Entity): float(self._data.yahoo.Atmosphere['visibility'])/1.61, 2) -class YahooWeatherData(object): +class YahooWeatherData: """Handle Yahoo! API object and limit updates.""" def __init__(self, woeid, temp_unit): diff --git a/homeassistant/components/sensor/zamg.py b/homeassistant/components/sensor/zamg.py index df5ff5e8d37..e8e5fdec4d8 100644 --- a/homeassistant/components/sensor/zamg.py +++ b/homeassistant/components/sensor/zamg.py @@ -133,7 +133,7 @@ class ZamgSensor(Entity): self.probe.update() -class ZamgData(object): +class ZamgData: """The class for handling the data retrieval.""" API_URL = 'http://www.zamg.ac.at/ogd/' diff --git a/homeassistant/components/sensor/zwave.py b/homeassistant/components/sensor/zwave.py index b2a913c2af8..d2166dde64e 100644 --- a/homeassistant/components/sensor/zwave.py +++ b/homeassistant/components/sensor/zwave.py @@ -8,7 +8,7 @@ import logging from homeassistant.components.sensor import DOMAIN from homeassistant.components import zwave from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT -from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sleepiq.py b/homeassistant/components/sleepiq.py index df36eef2f9e..4d4ecf0160b 100644 --- a/homeassistant/components/sleepiq.py +++ b/homeassistant/components/sleepiq.py @@ -73,7 +73,7 @@ def setup(hass, config): return True -class SleepIQData(object): +class SleepIQData: """Get the latest data from SleepIQ.""" def __init__(self, client): diff --git a/homeassistant/components/smappee.py b/homeassistant/components/smappee.py index b35cd8cf5a8..2ee0080a06d 100644 --- a/homeassistant/components/smappee.py +++ b/homeassistant/components/smappee.py @@ -71,7 +71,7 @@ def setup(hass, config): return True -class Smappee(object): +class Smappee: """Stores data retrieved from Smappee sensor.""" def __init__(self, client_id, client_secret, username, diff --git a/homeassistant/components/switch/anel_pwrctrl.py b/homeassistant/components/switch/anel_pwrctrl.py index 4e62b711979..01d27b8abcd 100644 --- a/homeassistant/components/switch/anel_pwrctrl.py +++ b/homeassistant/components/switch/anel_pwrctrl.py @@ -107,7 +107,7 @@ class PwrCtrlSwitch(SwitchDevice): self._port.off() -class PwrCtrlDevice(object): +class PwrCtrlDevice: """Device representation for per device throttling.""" def __init__(self, device): diff --git a/homeassistant/components/switch/broadlink.py b/homeassistant/components/switch/broadlink.py index 46002112177..6b754effaf1 100644 --- a/homeassistant/components/switch/broadlink.py +++ b/homeassistant/components/switch/broadlink.py @@ -348,7 +348,7 @@ class BroadlinkMP1Slot(BroadlinkRMSwitch): self._state = self._parent_device.get_outlet_status(self._slot) -class BroadlinkMP1Switch(object): +class BroadlinkMP1Switch: """Representation of a Broadlink switch - To fetch states of all slots.""" def __init__(self, device): diff --git a/homeassistant/components/switch/digitalloggers.py b/homeassistant/components/switch/digitalloggers.py index f3af70c6222..29e6771d1d5 100644 --- a/homeassistant/components/switch/digitalloggers.py +++ b/homeassistant/components/switch/digitalloggers.py @@ -122,7 +122,7 @@ class DINRelay(SwitchDevice): self._state = outlet_status[2] == 'ON' -class DINRelayDevice(object): +class DINRelayDevice: """Device representation for per device throttling.""" def __init__(self, power_switch): diff --git a/homeassistant/components/switch/dlink.py b/homeassistant/components/switch/dlink.py index 1c7253c4ec3..9ce324ef6bb 100644 --- a/homeassistant/components/switch/dlink.py +++ b/homeassistant/components/switch/dlink.py @@ -125,7 +125,7 @@ class SmartPlugSwitch(SwitchDevice): self.data.update() -class SmartPlugData(object): +class SmartPlugData: """Get the latest data from smart plug.""" def __init__(self, smartplug): diff --git a/homeassistant/components/switch/fritzdect.py b/homeassistant/components/switch/fritzdect.py index 9968f631260..9c0f852846a 100644 --- a/homeassistant/components/switch/fritzdect.py +++ b/homeassistant/components/switch/fritzdect.py @@ -163,7 +163,7 @@ class FritzDectSwitch(SwitchDevice): self.data.is_online = False -class FritzDectSwitchData(object): +class FritzDectSwitchData: """Get the latest data from the fritz box.""" def __init__(self, fritz, ain): diff --git a/homeassistant/components/switch/pilight.py b/homeassistant/components/switch/pilight.py index 4e5f1c47e9f..7ffce13ff6a 100644 --- a/homeassistant/components/switch/pilight.py +++ b/homeassistant/components/switch/pilight.py @@ -80,7 +80,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices(devices) -class _ReceiveHandle(object): +class _ReceiveHandle: def __init__(self, config, echo): """Initialize the handle.""" self.config_items = config.items() diff --git a/homeassistant/components/switch/scsgate.py b/homeassistant/components/switch/scsgate.py index adc08a65e71..b549f351afc 100644 --- a/homeassistant/components/switch/scsgate.py +++ b/homeassistant/components/switch/scsgate.py @@ -152,7 +152,7 @@ class SCSGateSwitch(SwitchDevice): ) -class SCSGateScenarioSwitch(object): +class SCSGateScenarioSwitch: """Provides a SCSGate scenario switch. This switch is always in an 'off" state, when toggled it's used to trigger diff --git a/homeassistant/components/switch/zwave.py b/homeassistant/components/switch/zwave.py index 8a0a1683aa4..31f942bd3af 100644 --- a/homeassistant/components/switch/zwave.py +++ b/homeassistant/components/switch/zwave.py @@ -8,7 +8,7 @@ import logging import time from homeassistant.components.switch import DOMAIN, SwitchDevice from homeassistant.components import zwave -from homeassistant.components.zwave import workaround, async_setup_platform # noqa # pylint: disable=unused-import +from homeassistant.components.zwave import workaround, async_setup_platform # noqa pylint: disable=unused-import _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/tellduslive.py b/homeassistant/components/tellduslive.py index dfb4b1e5fa9..bb235647d1b 100644 --- a/homeassistant/components/tellduslive.py +++ b/homeassistant/components/tellduslive.py @@ -206,7 +206,7 @@ def setup(hass, config, session=None): return True -class TelldusLiveClient(object): +class TelldusLiveClient: """Get the latest data and update the states.""" def __init__(self, hass, config, session): diff --git a/homeassistant/components/toon.py b/homeassistant/components/toon.py index ffb820e8148..cfd0d297d54 100644 --- a/homeassistant/components/toon.py +++ b/homeassistant/components/toon.py @@ -59,7 +59,7 @@ def setup(hass, config): return True -class ToonDataStore(object): +class ToonDataStore: """An object to store the Toon data.""" def __init__(self, username, password, gas=DEFAULT_GAS, diff --git a/homeassistant/components/tts/__init__.py b/homeassistant/components/tts/__init__.py index 999b584360c..f8a521c3e2f 100644 --- a/homeassistant/components/tts/__init__.py +++ b/homeassistant/components/tts/__init__.py @@ -169,7 +169,7 @@ async def async_setup(hass, config): return True -class SpeechManager(object): +class SpeechManager: """Representation of a speech store.""" def __init__(self, hass): @@ -440,7 +440,7 @@ class SpeechManager(object): return data_bytes.getvalue() -class Provider(object): +class Provider: """Represent a single TTS provider.""" hass = None diff --git a/homeassistant/components/upcloud.py b/homeassistant/components/upcloud.py index 9de7f6c4444..0f503dcdc39 100644 --- a/homeassistant/components/upcloud.py +++ b/homeassistant/components/upcloud.py @@ -92,7 +92,7 @@ def setup(hass, config): return True -class UpCloud(object): +class UpCloud: """Handle all communication with the UpCloud API.""" def __init__(self, manager): diff --git a/homeassistant/components/usps.py b/homeassistant/components/usps.py index 364562f1119..41aa240492b 100644 --- a/homeassistant/components/usps.py +++ b/homeassistant/components/usps.py @@ -65,7 +65,7 @@ def setup(hass, config): return True -class USPSData(object): +class USPSData: """Stores the data retrieved from USPS. For each entity to use, acts as the single point responsible for fetching diff --git a/homeassistant/components/verisure.py b/homeassistant/components/verisure.py index b367752c247..1f26ab639d6 100644 --- a/homeassistant/components/verisure.py +++ b/homeassistant/components/verisure.py @@ -89,7 +89,7 @@ def setup(hass, config): return True -class VerisureHub(object): +class VerisureHub: """A Verisure hub wrapper class.""" def __init__(self, domain_config, verisure): diff --git a/homeassistant/components/vultr.py b/homeassistant/components/vultr.py index 59fc707bb28..b28189444ee 100644 --- a/homeassistant/components/vultr.py +++ b/homeassistant/components/vultr.py @@ -74,7 +74,7 @@ def setup(hass, config): return True -class Vultr(object): +class Vultr: """Handle all communication with the Vultr API.""" def __init__(self, api_key): diff --git a/homeassistant/components/weather/darksky.py b/homeassistant/components/weather/darksky.py index 7afa97fd4f6..6dac22bc941 100644 --- a/homeassistant/components/weather/darksky.py +++ b/homeassistant/components/weather/darksky.py @@ -149,7 +149,7 @@ class DarkSkyWeather(WeatherEntity): self._ds_daily = self._dark_sky.daily -class DarkSkyData(object): +class DarkSkyData: """Get the latest data from Dark Sky.""" def __init__(self, api_key, latitude, longitude, units): diff --git a/homeassistant/components/weather/openweathermap.py b/homeassistant/components/weather/openweathermap.py index 65fa7c8cb0f..0c876d9e2d7 100644 --- a/homeassistant/components/weather/openweathermap.py +++ b/homeassistant/components/weather/openweathermap.py @@ -195,7 +195,7 @@ class OpenWeatherMapWeather(WeatherEntity): self.forecast_data = self._owm.forecast_data -class WeatherData(object): +class WeatherData: """Get the latest data from OpenWeatherMap.""" def __init__(self, owm, latitude, longitude, mode): diff --git a/homeassistant/components/weather/yweather.py b/homeassistant/components/weather/yweather.py index f9befece5a4..3f12195d6bf 100644 --- a/homeassistant/components/weather/yweather.py +++ b/homeassistant/components/weather/yweather.py @@ -175,7 +175,7 @@ class YahooWeatherWeather(WeatherEntity): return -class YahooWeatherData(object): +class YahooWeatherData: """Handle the Yahoo! API object and limit updates.""" def __init__(self, woeid, temp_unit): diff --git a/homeassistant/components/zigbee.py b/homeassistant/components/zigbee.py index 3a84e963841..67bdf744251 100644 --- a/homeassistant/components/zigbee.py +++ b/homeassistant/components/zigbee.py @@ -124,7 +124,7 @@ def frame_is_relevant(entity, frame): return True -class ZigBeeConfig(object): +class ZigBeeConfig: """Handle the fetching of configuration from the config file.""" def __init__(self, config): diff --git a/homeassistant/core.py b/homeassistant/core.py index dac16111de7..947ab78b673 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -116,7 +116,7 @@ class CoreState(enum.Enum): return self.value # type: ignore -class HomeAssistant(object): +class HomeAssistant: """Root object of the Home Assistant home automation.""" def __init__(self, loop=None): @@ -347,7 +347,7 @@ class EventOrigin(enum.Enum): return self.value -class Event(object): +class Event: """Representation of an event within the bus.""" __slots__ = ['event_type', 'data', 'origin', 'time_fired'] @@ -392,7 +392,7 @@ class Event(object): self.time_fired == other.time_fired) -class EventBus(object): +class EventBus: """Allow the firing of and listening for events.""" def __init__(self, hass: HomeAssistant) -> None: @@ -547,7 +547,7 @@ class EventBus(object): _LOGGER.warning("Unable to remove unknown listener %s", listener) -class State(object): +class State: """Object to represent a state within the state machine. entity_id: the entity that is represented. @@ -654,7 +654,7 @@ class State(object): dt_util.as_local(self.last_changed).isoformat()) -class StateMachine(object): +class StateMachine: """Helper class that tracks the state of different entities.""" def __init__(self, bus, loop): @@ -787,7 +787,7 @@ class StateMachine(object): }) -class Service(object): +class Service: """Representation of a callable service.""" __slots__ = ['func', 'schema', 'is_callback', 'is_coroutinefunction'] @@ -800,7 +800,7 @@ class Service(object): self.is_coroutinefunction = asyncio.iscoroutinefunction(func) -class ServiceCall(object): +class ServiceCall: """Representation of a call to a service.""" __slots__ = ['domain', 'service', 'data', 'call_id'] @@ -821,7 +821,7 @@ class ServiceCall(object): return "".format(self.domain, self.service) -class ServiceRegistry(object): +class ServiceRegistry: """Offer the services over the eventbus.""" def __init__(self, hass): @@ -1055,7 +1055,7 @@ class ServiceRegistry(object): _LOGGER.exception('Error executing service %s', service_call) -class Config(object): +class Config: """Configuration settings for Home Assistant.""" def __init__(self): diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 7dc5d2524ec..c7e88b210b3 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -56,7 +56,7 @@ def async_generate_entity_id(entity_id_format: str, name: Optional[str], entity_id_format.format(slugify(name)), current_ids) -class Entity(object): +class Entity: """An abstract class for Home Assistant entities.""" # SAFE TO OVERWRITE diff --git a/homeassistant/helpers/entity_component.py b/homeassistant/helpers/entity_component.py index 4ac3a147296..72b6ceecbfd 100644 --- a/homeassistant/helpers/entity_component.py +++ b/homeassistant/helpers/entity_component.py @@ -17,7 +17,7 @@ from .entity_platform import EntityPlatform DEFAULT_SCAN_INTERVAL = timedelta(seconds=15) -class EntityComponent(object): +class EntityComponent: """The EntityComponent manages platforms that manages entities. This class has the following responsibilities: diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index 472a88888d8..0847c116954 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -15,7 +15,7 @@ SLOW_SETUP_MAX_WAIT = 60 PLATFORM_NOT_READY_RETRIES = 10 -class EntityPlatform(object): +class EntityPlatform: """Manage the entities for a single platform.""" def __init__(self, *, hass, logger, domain, platform_name, platform, diff --git a/homeassistant/helpers/entity_values.py b/homeassistant/helpers/entity_values.py index 19980394d26..5caa6b93131 100644 --- a/homeassistant/helpers/entity_values.py +++ b/homeassistant/helpers/entity_values.py @@ -6,7 +6,7 @@ import re from homeassistant.core import split_entity_id -class EntityValues(object): +class EntityValues: """Class to store entity id based values.""" def __init__(self, exact=None, domain=None, glob=None): diff --git a/homeassistant/helpers/state.py b/homeassistant/helpers/state.py index 72deabaae28..b2360f3aca5 100644 --- a/homeassistant/helpers/state.py +++ b/homeassistant/helpers/state.py @@ -92,7 +92,7 @@ SERVICE_TO_STATE = { } -class AsyncTrackStates(object): +class AsyncTrackStates: """ Record the time when the with-block is entered. diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index f523726c388..4d09416398b 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -82,7 +82,7 @@ def extract_entities(template, variables=None): return MATCH_ALL -class Template(object): +class Template: """Class to hold a template and manage caching and rendering.""" def __init__(self, template, hass=None): @@ -198,7 +198,7 @@ class Template(object): self.hass == other.hass) -class AllStates(object): +class AllStates: """Class to expose all HA states as attributes.""" def __init__(self, hass): @@ -226,7 +226,7 @@ class AllStates(object): return STATE_UNKNOWN if state is None else state.state -class DomainStates(object): +class DomainStates: """Class to expose a specific HA domain as attributes.""" def __init__(self, hass, domain): @@ -286,7 +286,7 @@ def _wrap_state(state): return None if state is None else TemplateState(state) -class TemplateMethods(object): +class TemplateMethods: """Class to expose helpers to templates.""" def __init__(self, hass): diff --git a/homeassistant/remote.py b/homeassistant/remote.py index ae932b7d955..b8e6a862b46 100644 --- a/homeassistant/remote.py +++ b/homeassistant/remote.py @@ -41,7 +41,7 @@ class APIStatus(enum.Enum): return self.value # type: ignore -class API(object): +class API: """Object to pass around Home Assistant API location and credentials.""" def __init__(self, host: str, api_password: Optional[str] = None, diff --git a/homeassistant/util/__init__.py b/homeassistant/util/__init__.py index c52bfa584da..a1c0fb0024c 100644 --- a/homeassistant/util/__init__.py +++ b/homeassistant/util/__init__.py @@ -236,7 +236,7 @@ class OrderedSet(MutableSet): return set(self) == set(other) -class Throttle(object): +class Throttle: """A class for throttling the execution of tasks. This method decorator adds a cooldown to a method to prevent it from being diff --git a/homeassistant/util/logging.py b/homeassistant/util/logging.py index 65999a3a5c7..7ce98fc2f2a 100644 --- a/homeassistant/util/logging.py +++ b/homeassistant/util/logging.py @@ -22,7 +22,7 @@ class HideSensitiveDataFilter(logging.Filter): # pylint: disable=invalid-name -class AsyncHandler(object): +class AsyncHandler: """Logging handler wrapper to add an async layer.""" def __init__(self, loop, handler): diff --git a/homeassistant/util/unit_system.py b/homeassistant/util/unit_system.py index ec17c1b796b..b8fb393a2f3 100644 --- a/homeassistant/util/unit_system.py +++ b/homeassistant/util/unit_system.py @@ -62,7 +62,7 @@ def is_valid_unit(unit: str, unit_type: str) -> bool: return unit in units -class UnitSystem(object): +class UnitSystem: """A container for units of measure.""" def __init__(self: object, name: str, temperature: str, length: str, diff --git a/tests/common.py b/tests/common.py index b03d473e6f3..3e8e813164e 100644 --- a/tests/common.py +++ b/tests/common.py @@ -355,7 +355,7 @@ def ensure_auth_manager_loaded(auth_mgr): store._users = OrderedDict() -class MockModule(object): +class MockModule: """Representation of a fake module.""" # pylint: disable=invalid-name @@ -391,7 +391,7 @@ class MockModule(object): self.async_unload_entry = async_unload_entry -class MockPlatform(object): +class MockPlatform: """Provide a fake platform.""" # pylint: disable=invalid-name diff --git a/tests/components/alexa/test_smart_home.py b/tests/components/alexa/test_smart_home.py index afa4d19b5d9..ce4ec5aa146 100644 --- a/tests/components/alexa/test_smart_home.py +++ b/tests/components/alexa/test_smart_home.py @@ -1225,7 +1225,7 @@ def reported_properties(hass, endpoint): return _ReportedProperties(msg['context']['properties']) -class _ReportedProperties(object): +class _ReportedProperties: def __init__(self, properties): self.properties = properties diff --git a/tests/components/binary_sensor/test_ffmpeg.py b/tests/components/binary_sensor/test_ffmpeg.py index aadafadd4a6..da9350008d8 100644 --- a/tests/components/binary_sensor/test_ffmpeg.py +++ b/tests/components/binary_sensor/test_ffmpeg.py @@ -7,7 +7,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component, mock_coro) -class TestFFmpegNoiseSetup(object): +class TestFFmpegNoiseSetup: """Test class for ffmpeg.""" def setup_method(self): @@ -72,7 +72,7 @@ class TestFFmpegNoiseSetup(object): assert entity.state == 'on' -class TestFFmpegMotionSetup(object): +class TestFFmpegMotionSetup: """Test class for ffmpeg.""" def setup_method(self): diff --git a/tests/components/binary_sensor/test_workday.py b/tests/components/binary_sensor/test_workday.py index af7e856e417..893745ce3de 100644 --- a/tests/components/binary_sensor/test_workday.py +++ b/tests/components/binary_sensor/test_workday.py @@ -12,7 +12,7 @@ from tests.common import ( FUNCTION_PATH = 'homeassistant.components.binary_sensor.workday.get_date' -class TestWorkdaySetup(object): +class TestWorkdaySetup: """Test class for workday sensor.""" def setup_method(self): diff --git a/tests/components/camera/test_init.py b/tests/components/camera/test_init.py index d0f1425a595..cf902ca1779 100644 --- a/tests/components/camera/test_init.py +++ b/tests/components/camera/test_init.py @@ -30,7 +30,7 @@ def mock_camera(hass): yield -class TestSetupCamera(object): +class TestSetupCamera: """Test class for setup camera.""" def setup_method(self): @@ -53,7 +53,7 @@ class TestSetupCamera(object): setup_component(self.hass, camera.DOMAIN, config) -class TestGetImage(object): +class TestGetImage: """Test class for camera.""" def setup_method(self): diff --git a/tests/components/device_tracker/test_upc_connect.py b/tests/components/device_tracker/test_upc_connect.py index e45d70bc172..6294ba3467a 100644 --- a/tests/components/device_tracker/test_upc_connect.py +++ b/tests/components/device_tracker/test_upc_connect.py @@ -33,7 +33,7 @@ def mock_load_config(): yield -class TestUPCConnect(object): +class TestUPCConnect: """Tests for the Ddwrt device tracker platform.""" def setup_method(self): diff --git a/tests/components/image_processing/test_init.py b/tests/components/image_processing/test_init.py index 628c5405eaa..ab2e3be11d6 100644 --- a/tests/components/image_processing/test_init.py +++ b/tests/components/image_processing/test_init.py @@ -12,7 +12,7 @@ from tests.common import ( get_test_home_assistant, get_test_instance_port, assert_setup_component) -class TestSetupImageProcessing(object): +class TestSetupImageProcessing: """Test class for setup image processing.""" def setup_method(self): @@ -48,7 +48,7 @@ class TestSetupImageProcessing(object): assert self.hass.services.has_service(ip.DOMAIN, 'scan') -class TestImageProcessing(object): +class TestImageProcessing: """Test class for image processing.""" def setup_method(self): @@ -109,7 +109,7 @@ class TestImageProcessing(object): assert state.state == '0' -class TestImageProcessingAlpr(object): +class TestImageProcessingAlpr: """Test class for alpr image processing.""" def setup_method(self): @@ -211,7 +211,7 @@ class TestImageProcessingAlpr(object): assert event_data[0]['entity_id'] == 'image_processing.demo_alpr' -class TestImageProcessingFace(object): +class TestImageProcessingFace: """Test class for face image processing.""" def setup_method(self): diff --git a/tests/components/image_processing/test_microsoft_face_detect.py b/tests/components/image_processing/test_microsoft_face_detect.py index b743dee9704..acc2519c9b7 100644 --- a/tests/components/image_processing/test_microsoft_face_detect.py +++ b/tests/components/image_processing/test_microsoft_face_detect.py @@ -11,7 +11,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component, load_fixture, mock_coro) -class TestMicrosoftFaceDetectSetup(object): +class TestMicrosoftFaceDetectSetup: """Test class for image processing.""" def setup_method(self): @@ -74,7 +74,7 @@ class TestMicrosoftFaceDetectSetup(object): assert self.hass.states.get('image_processing.test_local') -class TestMicrosoftFaceDetect(object): +class TestMicrosoftFaceDetect: """Test class for image processing.""" def setup_method(self): diff --git a/tests/components/image_processing/test_microsoft_face_identify.py b/tests/components/image_processing/test_microsoft_face_identify.py index c2ab5684ed0..8797f661767 100644 --- a/tests/components/image_processing/test_microsoft_face_identify.py +++ b/tests/components/image_processing/test_microsoft_face_identify.py @@ -11,7 +11,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component, load_fixture, mock_coro) -class TestMicrosoftFaceIdentifySetup(object): +class TestMicrosoftFaceIdentifySetup: """Test class for image processing.""" def setup_method(self): @@ -75,7 +75,7 @@ class TestMicrosoftFaceIdentifySetup(object): assert self.hass.states.get('image_processing.test_local') -class TestMicrosoftFaceIdentify(object): +class TestMicrosoftFaceIdentify: """Test class for image processing.""" def setup_method(self): diff --git a/tests/components/image_processing/test_openalpr_cloud.py b/tests/components/image_processing/test_openalpr_cloud.py index 50060e08a4b..65e735a6f7e 100644 --- a/tests/components/image_processing/test_openalpr_cloud.py +++ b/tests/components/image_processing/test_openalpr_cloud.py @@ -12,7 +12,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component, load_fixture, mock_coro) -class TestOpenAlprCloudSetup(object): +class TestOpenAlprCloudSetup: """Test class for image processing.""" def setup_method(self): @@ -103,7 +103,7 @@ class TestOpenAlprCloudSetup(object): setup_component(self.hass, ip.DOMAIN, config) -class TestOpenAlprCloud(object): +class TestOpenAlprCloud: """Test class for image processing.""" def setup_method(self): diff --git a/tests/components/image_processing/test_openalpr_local.py b/tests/components/image_processing/test_openalpr_local.py index fc40f8e17fb..38e94166c5a 100644 --- a/tests/components/image_processing/test_openalpr_local.py +++ b/tests/components/image_processing/test_openalpr_local.py @@ -26,7 +26,7 @@ def mock_async_subprocess(): return async_popen -class TestOpenAlprLocalSetup(object): +class TestOpenAlprLocalSetup: """Test class for image processing.""" def setup_method(self): @@ -96,7 +96,7 @@ class TestOpenAlprLocalSetup(object): setup_component(self.hass, ip.DOMAIN, config) -class TestOpenAlprLocal(object): +class TestOpenAlprLocal: """Test class for image processing.""" def setup_method(self): diff --git a/tests/components/media_player/test_blackbird.py b/tests/components/media_player/test_blackbird.py index 7c85775949c..550bfe88a61 100644 --- a/tests/components/media_player/test_blackbird.py +++ b/tests/components/media_player/test_blackbird.py @@ -25,7 +25,7 @@ class AttrDict(dict): return self[item] -class MockBlackbird(object): +class MockBlackbird: """Mock for pyblackbird object.""" def __init__(self): diff --git a/tests/components/media_player/test_monoprice.py b/tests/components/media_player/test_monoprice.py index 399cdc67ca6..14e1769047a 100644 --- a/tests/components/media_player/test_monoprice.py +++ b/tests/components/media_player/test_monoprice.py @@ -27,7 +27,7 @@ class AttrDict(dict): return self[item] -class MockMonoprice(object): +class MockMonoprice: """Mock for pymonoprice object.""" def __init__(self): diff --git a/tests/components/media_player/test_yamaha.py b/tests/components/media_player/test_yamaha.py index e17241485db..980284737a2 100644 --- a/tests/components/media_player/test_yamaha.py +++ b/tests/components/media_player/test_yamaha.py @@ -15,7 +15,7 @@ def _create_zone_mock(name, url): return zone -class FakeYamahaDevice(object): +class FakeYamahaDevice: """A fake Yamaha device.""" def __init__(self, ctrl_url, name, zones=None): diff --git a/tests/components/notify/test_html5.py b/tests/components/notify/test_html5.py index 318f3c7512c..486300679b7 100644 --- a/tests/components/notify/test_html5.py +++ b/tests/components/notify/test_html5.py @@ -65,7 +65,7 @@ async def mock_client(hass, aiohttp_client, registrations=None): return await aiohttp_client(hass.http.app) -class TestHtml5Notify(object): +class TestHtml5Notify: """Tests for HTML5 notify platform.""" def test_get_service_with_no_json(self): diff --git a/tests/components/test_ffmpeg.py b/tests/components/test_ffmpeg.py index 5a5fdffd5a3..44c3a1dd695 100644 --- a/tests/components/test_ffmpeg.py +++ b/tests/components/test_ffmpeg.py @@ -38,7 +38,7 @@ class MockFFmpegDev(ffmpeg.FFmpegBase): self.called_entities = entity_ids -class TestFFmpegSetup(object): +class TestFFmpegSetup: """Test class for ffmpeg.""" def setup_method(self): diff --git a/tests/components/test_microsoft_face.py b/tests/components/test_microsoft_face.py index 370059a0a09..92f840b8033 100644 --- a/tests/components/test_microsoft_face.py +++ b/tests/components/test_microsoft_face.py @@ -9,7 +9,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component, mock_coro, load_fixture) -class TestMicrosoftFaceSetup(object): +class TestMicrosoftFaceSetup: """Test the microsoft face component.""" def setup_method(self): diff --git a/tests/components/test_mqtt_eventstream.py b/tests/components/test_mqtt_eventstream.py index 48bc04d46ed..38924817980 100644 --- a/tests/components/test_mqtt_eventstream.py +++ b/tests/components/test_mqtt_eventstream.py @@ -18,7 +18,7 @@ from tests.common import ( ) -class TestMqttEventStream(object): +class TestMqttEventStream: """Test the MQTT eventstream module.""" def setup_method(self): diff --git a/tests/components/test_mqtt_statestream.py b/tests/components/test_mqtt_statestream.py index 2ed2f4487ea..4cf79e679cd 100644 --- a/tests/components/test_mqtt_statestream.py +++ b/tests/components/test_mqtt_statestream.py @@ -12,7 +12,7 @@ from tests.common import ( ) -class TestMqttStateStream(object): +class TestMqttStateStream: """Test the MQTT statestream module.""" def setup_method(self): diff --git a/tests/components/test_plant.py b/tests/components/test_plant.py index ee1372509d9..95167dd181b 100644 --- a/tests/components/test_plant.py +++ b/tests/components/test_plant.py @@ -41,7 +41,7 @@ GOOD_CONFIG = { } -class _MockState(object): +class _MockState: def __init__(self, state=None): self.state = state diff --git a/tests/components/test_rest_command.py b/tests/components/test_rest_command.py index 3ddcfae8c01..097fb799d40 100644 --- a/tests/components/test_rest_command.py +++ b/tests/components/test_rest_command.py @@ -10,7 +10,7 @@ from tests.common import ( get_test_home_assistant, assert_setup_component) -class TestRestCommandSetup(object): +class TestRestCommandSetup: """Test the rest command component.""" def setup_method(self): @@ -47,7 +47,7 @@ class TestRestCommandSetup(object): assert self.hass.services.has_service(rc.DOMAIN, 'test_get') -class TestRestCommandComponent(object): +class TestRestCommandComponent: """Test the rest command component.""" def setup_method(self): diff --git a/tests/components/tts/test_google.py b/tests/components/tts/test_google.py index 6a2d2c65035..cf9a7b2db29 100644 --- a/tests/components/tts/test_google.py +++ b/tests/components/tts/test_google.py @@ -15,7 +15,7 @@ from tests.common import ( from .test_init import mutagen_mock # noqa -class TestTTSGooglePlatform(object): +class TestTTSGooglePlatform: """Test the Google speech component.""" def setup_method(self): diff --git a/tests/components/tts/test_init.py b/tests/components/tts/test_init.py index b6bfa430fd2..e8746ee762f 100644 --- a/tests/components/tts/test_init.py +++ b/tests/components/tts/test_init.py @@ -29,7 +29,7 @@ def mutagen_mock(): yield -class TestTTS(object): +class TestTTS: """Test the Google speech component.""" def setup_method(self): diff --git a/tests/components/tts/test_marytts.py b/tests/components/tts/test_marytts.py index b55236c5e8e..7ec2ae39cd6 100644 --- a/tests/components/tts/test_marytts.py +++ b/tests/components/tts/test_marytts.py @@ -14,7 +14,7 @@ from tests.common import ( from .test_init import mutagen_mock # noqa -class TestTTSMaryTTSPlatform(object): +class TestTTSMaryTTSPlatform: """Test the speech component.""" def setup_method(self): diff --git a/tests/components/tts/test_voicerss.py b/tests/components/tts/test_voicerss.py index 2abdc0e69ff..365cf1ff73b 100644 --- a/tests/components/tts/test_voicerss.py +++ b/tests/components/tts/test_voicerss.py @@ -14,7 +14,7 @@ from tests.common import ( from .test_init import mutagen_mock # noqa -class TestTTSVoiceRSSPlatform(object): +class TestTTSVoiceRSSPlatform: """Test the voicerss speech component.""" def setup_method(self): diff --git a/tests/components/tts/test_yandextts.py b/tests/components/tts/test_yandextts.py index 5b4ef4dcf53..82d20318928 100644 --- a/tests/components/tts/test_yandextts.py +++ b/tests/components/tts/test_yandextts.py @@ -13,7 +13,7 @@ from tests.common import ( from .test_init import mutagen_mock # noqa -class TestTTSYandexPlatform(object): +class TestTTSYandexPlatform: """Test the speech component.""" def setup_method(self): diff --git a/tests/helpers/test_dispatcher.py b/tests/helpers/test_dispatcher.py index 066e7386c6e..55e67def2bc 100644 --- a/tests/helpers/test_dispatcher.py +++ b/tests/helpers/test_dispatcher.py @@ -8,7 +8,7 @@ from homeassistant.helpers.dispatcher import ( from tests.common import get_test_home_assistant -class TestHelpersDispatcher(object): +class TestHelpersDispatcher: """Tests for discovery helper methods.""" def setup_method(self, method): diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index 4211e3da31b..4981ad23cc0 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -71,7 +71,7 @@ def test_async_update_support(hass): assert len(async_update) == 1 -class TestHelpersEntity(object): +class TestHelpersEntity: """Test homeassistant.helpers.entity module.""" def setup_method(self, method): diff --git a/tests/util/test_init.py b/tests/util/test_init.py index 60b0e68ca59..1f43c5a4b49 100644 --- a/tests/util/test_init.py +++ b/tests/util/test_init.py @@ -221,7 +221,7 @@ class TestUtil(unittest.TestCase): def test_throttle_per_instance(self): """Test that the throttle method is done per instance of a class.""" - class Tester(object): + class Tester: """A tester class for the throttle.""" @util.Throttle(timedelta(seconds=1)) @@ -234,7 +234,7 @@ class TestUtil(unittest.TestCase): def test_throttle_on_method(self): """Test that throttle works when wrapping a method.""" - class Tester(object): + class Tester: """A tester class for the throttle.""" def hello(self): @@ -249,7 +249,7 @@ class TestUtil(unittest.TestCase): def test_throttle_on_two_method(self): """Test that throttle works when wrapping two methods.""" - class Tester(object): + class Tester: """A test class for the throttle.""" @util.Throttle(timedelta(seconds=1))