Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions esphomeyaml/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion esphomeyaml/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion esphomeyaml/espota.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion esphomeyaml/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion esphomeyaml/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion esphomeyaml/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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 ==========='
Expand Down