Enable Travis Linting (#3)

* Flake8 Travis Job

* Fix flake8 warnings

* Fix pylint errors

* Fix travis file
This commit is contained in:
Otto Winter
2018-04-10 17:17:46 +02:00
committed by GitHub
parent 51c856e65e
commit 0ab63dc4d4
17 changed files with 238 additions and 180 deletions
+2 -3
View File
@@ -50,7 +50,6 @@ def get_component(domain):
module = importlib.import_module(path)
except ImportError as err:
_LOGGER.debug(err)
pass
else:
_COMPONENT_CACHE[domain] = module
return module
@@ -87,7 +86,7 @@ def validate_config(config):
for req in REQUIRED_COMPONENTS:
if req not in config:
raise ESPHomeYAMLError("Component %s is required for esphomeyaml.", req)
raise ESPHomeYAMLError("Component {} is required for esphomeyaml.".format(req))
_ALL_COMPONENTS = list(config.keys())
@@ -137,7 +136,7 @@ def validate_config(config):
continue
platforms = []
for i, p_config in enumerate(conf):
for p_config in conf:
if not isinstance(p_config, dict):
result.add_error(u"Platform schemas mus have 'platform:' key")
continue