1
0
mirror of https://github.com/esphome/esphome.git synced 2024-12-03 22:38:47 +01:00

It now complies with flake8 --ignore=E501,W291 (#1)

- Not changning long lines or lines ending with space.
This commit is contained in:
Jimmy Hedman 2018-04-10 16:21:32 +02:00 committed by Otto Winter
parent de766a0100
commit 51c856e65e
6 changed files with 9 additions and 11 deletions

View File

@ -205,11 +205,9 @@ def main():
parser.add_argument('configuration', help='Your YAML configuration file.')
subparsers = parser.add_subparsers(help='Commands', dest='command')
subparsers.required = True
parser_config = subparsers.add_parser('config',
help='Validate the configuration and spit it out.')
subparsers.add_parser('config', help='Validate the configuration and spit it out.')
parser_compile = subparsers.add_parser('compile',
help='Read the configuration and compile a program.')
subparsers.add_parser('compile', help='Read the configuration and compile a program.')
parser_upload = subparsers.add_parser('upload', help='Validate the configuration '
'and upload the latest binary.')
@ -245,8 +243,8 @@ def main():
parser_clean.add_argument('--password', help='Manually set the password.')
parser_clean.add_argument('--client-id', help='Manually set the client id.')
parser_wizard = subparsers.add_parser('wizard', help="A helpful setup wizard that will guide "
"you through setting up esphomeyaml.")
subparsers.add_parser('wizard', help="A helpful setup wizard that will guide "
"you through setting up esphomeyaml.")
args = parser.parse_args()

View File

@ -197,7 +197,7 @@ def load_config(path):
try:
result = validate_config(config)
except Exception as e:
except Exception:
print(u"Unexpected exception while reading configuration:")
raise

View File

@ -183,7 +183,8 @@ def serve(remote_host, local_addr, remote_port, local_port, password, filename,
offset = 0
while True:
chunk = f.read(1024)
if not chunk: break
if not chunk:
break
offset += len(chunk)
update_progress(offset / float(content_size))
connection.settimeout(10)

View File

@ -392,7 +392,7 @@ def quote(s):
return u"'" + s.replace(u"'", u"'\"'\"'") + u"'"
def color(the_color, message = '', reset=None):
def color(the_color, message='', reset=None):
"""Color helper."""
from colorlog.escape_codes import escape_codes, parse_colors
if not message:

View File

@ -290,4 +290,3 @@ def wizard(path):
print(" > Then follow the rest of the getting started guide:")
print(" > https://esphomelib.com/esphomeyaml/getting-started.html")
return 0

View File

@ -6,7 +6,7 @@ import os
from esphomeyaml.config import get_component
from esphomeyaml.const import CONF_BOARD, CONF_ESPHOMEYAML, CONF_LIBRARY_URI, CONF_LOGGER, \
CONF_NAME, CONF_OTA, CONF_PLATFORM, ESP_PLATFORM_ESP32, ESP_PLATFORM_ESP8266
CONF_NAME, CONF_PLATFORM, ESP_PLATFORM_ESP32, ESP_PLATFORM_ESP8266
from esphomeyaml.core import ESPHomeYAMLError
CPP_AUTO_GENERATE_BEGIN = u'// ========== AUTO GENERATED CODE BEGIN ==========='