mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +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:
parent
de766a0100
commit
51c856e65e
6 changed files with 9 additions and 11 deletions
|
@ -205,11 +205,9 @@ def main():
|
||||||
parser.add_argument('configuration', help='Your YAML configuration file.')
|
parser.add_argument('configuration', help='Your YAML configuration file.')
|
||||||
subparsers = parser.add_subparsers(help='Commands', dest='command')
|
subparsers = parser.add_subparsers(help='Commands', dest='command')
|
||||||
subparsers.required = True
|
subparsers.required = True
|
||||||
parser_config = subparsers.add_parser('config',
|
subparsers.add_parser('config', help='Validate the configuration and spit it out.')
|
||||||
help='Validate the configuration and spit it out.')
|
|
||||||
|
|
||||||
parser_compile = subparsers.add_parser('compile',
|
subparsers.add_parser('compile', help='Read the configuration and compile a program.')
|
||||||
help='Read the configuration and compile a program.')
|
|
||||||
|
|
||||||
parser_upload = subparsers.add_parser('upload', help='Validate the configuration '
|
parser_upload = subparsers.add_parser('upload', help='Validate the configuration '
|
||||||
'and upload the latest binary.')
|
'and upload the latest binary.')
|
||||||
|
@ -245,7 +243,7 @@ def main():
|
||||||
parser_clean.add_argument('--password', help='Manually set the password.')
|
parser_clean.add_argument('--password', help='Manually set the password.')
|
||||||
parser_clean.add_argument('--client-id', help='Manually set the client id.')
|
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 "
|
subparsers.add_parser('wizard', help="A helpful setup wizard that will guide "
|
||||||
"you through setting up esphomeyaml.")
|
"you through setting up esphomeyaml.")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
|
@ -197,7 +197,7 @@ def load_config(path):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = validate_config(config)
|
result = validate_config(config)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
print(u"Unexpected exception while reading configuration:")
|
print(u"Unexpected exception while reading configuration:")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,8 @@ def serve(remote_host, local_addr, remote_port, local_port, password, filename,
|
||||||
offset = 0
|
offset = 0
|
||||||
while True:
|
while True:
|
||||||
chunk = f.read(1024)
|
chunk = f.read(1024)
|
||||||
if not chunk: break
|
if not chunk:
|
||||||
|
break
|
||||||
offset += len(chunk)
|
offset += len(chunk)
|
||||||
update_progress(offset / float(content_size))
|
update_progress(offset / float(content_size))
|
||||||
connection.settimeout(10)
|
connection.settimeout(10)
|
||||||
|
|
|
@ -392,7 +392,7 @@ def quote(s):
|
||||||
return u"'" + s.replace(u"'", u"'\"'\"'") + u"'"
|
return u"'" + s.replace(u"'", u"'\"'\"'") + u"'"
|
||||||
|
|
||||||
|
|
||||||
def color(the_color, message = '', reset=None):
|
def color(the_color, message='', reset=None):
|
||||||
"""Color helper."""
|
"""Color helper."""
|
||||||
from colorlog.escape_codes import escape_codes, parse_colors
|
from colorlog.escape_codes import escape_codes, parse_colors
|
||||||
if not message:
|
if not message:
|
||||||
|
|
|
@ -290,4 +290,3 @@ def wizard(path):
|
||||||
print(" > Then follow the rest of the getting started guide:")
|
print(" > Then follow the rest of the getting started guide:")
|
||||||
print(" > https://esphomelib.com/esphomeyaml/getting-started.html")
|
print(" > https://esphomelib.com/esphomeyaml/getting-started.html")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import os
|
||||||
|
|
||||||
from esphomeyaml.config import get_component
|
from esphomeyaml.config import get_component
|
||||||
from esphomeyaml.const import CONF_BOARD, CONF_ESPHOMEYAML, CONF_LIBRARY_URI, CONF_LOGGER, \
|
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
|
from esphomeyaml.core import ESPHomeYAMLError
|
||||||
|
|
||||||
CPP_AUTO_GENERATE_BEGIN = u'// ========== AUTO GENERATED CODE BEGIN ==========='
|
CPP_AUTO_GENERATE_BEGIN = u'// ========== AUTO GENERATED CODE BEGIN ==========='
|
||||||
|
|
Loading…
Reference in a new issue