Switched style checking to flake8 instead of pep8

This commit is contained in:
Paulus Schoutsen 2014-11-16 22:18:52 -08:00
parent 973ce21353
commit 5d107ed74b
7 changed files with 8 additions and 14 deletions

View File

@ -3,9 +3,9 @@ python:
- "3.4" - "3.4"
install: install:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install pep8 pylint coveralls - pip install flake8 pylint coveralls
script: script:
- pep8 homeassistant --exclude bower_components,external - flake8 homeassistant --exclude bower_components,external
- pylint homeassistant - pylint homeassistant
- coverage run --source=homeassistant -m homeassistant -t test - coverage run --source=homeassistant -m homeassistant -t test
after_success: after_success:

View File

@ -6,7 +6,6 @@ Home Assistant is a Home Automation framework for observing the state
of entities and react to changes. of entities and react to changes.
""" """
import sys
import os import os
import time import time
import logging import logging

View File

@ -16,7 +16,6 @@ Each component should publish services only under its own domain.
""" """
import itertools as it import itertools as it
import logging import logging
import importlib
import homeassistant as ha import homeassistant as ha
import homeassistant.util as util import homeassistant.util as util

View File

@ -10,8 +10,6 @@ import os
import csv import csv
from datetime import datetime, timedelta from datetime import datetime, timedelta
import requests
import homeassistant as ha import homeassistant as ha
from homeassistant.loader import get_component from homeassistant.loader import get_component
import homeassistant.util as util import homeassistant.util as util
@ -268,9 +266,9 @@ class DeviceTracker(object):
self.path_known_devices_file) self.path_known_devices_file)
# Remove entities that are no longer maintained # Remove entities that are no longer maintained
new_entity_ids = set([known_devices[device]['entity_id'] new_entity_ids = set([known_devices[dev]['entity_id']
for device in known_devices for dev in known_devices
if known_devices[device]['track']]) if known_devices[dev]['track']])
for entity_id in \ for entity_id in \
self.device_entity_ids - new_entity_ids: self.device_entity_ids - new_entity_ids:

View File

@ -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] entity_ids = hass.states.get(entity_id).attributes[ATTR_ENTITY_ID]
if domain_filter: if domain_filter:
return [entity_id for entity_id in entity_ids return [ent_id for ent_id in entity_ids
if entity_id.startswith(domain_filter)] if ent_id.startswith(domain_filter)]
else: else:
return entity_ids return entity_ids

View File

@ -85,8 +85,6 @@ from urllib.parse import urlparse, parse_qs
import homeassistant as ha import homeassistant as ha
import homeassistant.remote as rem import homeassistant.remote as rem
import homeassistant.util as util import homeassistant.util as util
from homeassistant.components import (STATE_ON, STATE_OFF,
SERVICE_TURN_ON, SERVICE_TURN_OFF)
from . import frontend from . import frontend
DOMAIN = "http" DOMAIN = "http"

View File

@ -11,7 +11,7 @@ import homeassistant.util as util
from homeassistant.loader import get_component from homeassistant.loader import get_component
from homeassistant.components import ( from homeassistant.components import (
group, extract_entity_ids, STATE_ON, 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' DOMAIN = 'switch'
DEPENDENCIES = [] DEPENDENCIES = []