mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Switched style checking to flake8 instead of pep8
This commit is contained in:
parent
973ce21353
commit
5d107ed74b
@ -3,9 +3,9 @@ python:
|
||||
- "3.4"
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
- pip install pep8 pylint coveralls
|
||||
- pip install flake8 pylint coveralls
|
||||
script:
|
||||
- pep8 homeassistant --exclude bower_components,external
|
||||
- flake8 homeassistant --exclude bower_components,external
|
||||
- pylint homeassistant
|
||||
- coverage run --source=homeassistant -m homeassistant -t test
|
||||
after_success:
|
||||
|
@ -6,7 +6,6 @@ Home Assistant is a Home Automation framework for observing the state
|
||||
of entities and react to changes.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
|
@ -16,7 +16,6 @@ Each component should publish services only under its own domain.
|
||||
"""
|
||||
import itertools as it
|
||||
import logging
|
||||
import importlib
|
||||
|
||||
import homeassistant as ha
|
||||
import homeassistant.util as util
|
||||
|
@ -10,8 +10,6 @@ import os
|
||||
import csv
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import requests
|
||||
|
||||
import homeassistant as ha
|
||||
from homeassistant.loader import get_component
|
||||
import homeassistant.util as util
|
||||
@ -268,9 +266,9 @@ class DeviceTracker(object):
|
||||
self.path_known_devices_file)
|
||||
|
||||
# Remove entities that are no longer maintained
|
||||
new_entity_ids = set([known_devices[device]['entity_id']
|
||||
for device in known_devices
|
||||
if known_devices[device]['track']])
|
||||
new_entity_ids = set([known_devices[dev]['entity_id']
|
||||
for dev in known_devices
|
||||
if known_devices[dev]['track']])
|
||||
|
||||
for entity_id in \
|
||||
self.device_entity_ids - new_entity_ids:
|
||||
|
@ -80,8 +80,8 @@ def get_entity_ids(hass, entity_id, domain_filter=None):
|
||||
entity_ids = hass.states.get(entity_id).attributes[ATTR_ENTITY_ID]
|
||||
|
||||
if domain_filter:
|
||||
return [entity_id for entity_id in entity_ids
|
||||
if entity_id.startswith(domain_filter)]
|
||||
return [ent_id for ent_id in entity_ids
|
||||
if ent_id.startswith(domain_filter)]
|
||||
else:
|
||||
return entity_ids
|
||||
|
||||
|
@ -85,8 +85,6 @@ from urllib.parse import urlparse, parse_qs
|
||||
import homeassistant as ha
|
||||
import homeassistant.remote as rem
|
||||
import homeassistant.util as util
|
||||
from homeassistant.components import (STATE_ON, STATE_OFF,
|
||||
SERVICE_TURN_ON, SERVICE_TURN_OFF)
|
||||
from . import frontend
|
||||
|
||||
DOMAIN = "http"
|
||||
|
@ -11,7 +11,7 @@ import homeassistant.util as util
|
||||
from homeassistant.loader import get_component
|
||||
from homeassistant.components import (
|
||||
group, extract_entity_ids, STATE_ON,
|
||||
SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME)
|
||||
SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID)
|
||||
|
||||
DOMAIN = 'switch'
|
||||
DEPENDENCIES = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user