python: quieten modern flake8.

After Ubuntu 18.10 upgrade, lots of new flake8 warnings.

$ flake8 --version:
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.4.0, pyflakes: 1.6.0) CPython 3.6.7rc1 on Linux

Note it seems that W503 warned about line breaks before binary
operators, and W504 complains about them after.  I prefer W504, so
disable W503.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-10-26 16:19:53 +10:30
committed by Christian Decker
parent 322d483b36
commit 38e6aa66ff
7 changed files with 38 additions and 37 deletions

View File

@@ -274,7 +274,8 @@ PYSRC=$(shell git ls-files "*.py") contrib/pylightning/lightning-pay
check-python:
@# E501 line too long (N > 79 characters)
@# E731 do not assign a lambda expression, use a def
@flake8 --ignore=E501,E731 --exclude=contrib/pylightning/lightning/__init__.py ${PYSRC}
@# W503: line break before binary operator
@flake8 --ignore=E501,E731,W503 --exclude=contrib/pylightning/lightning/__init__.py ${PYSRC}
check-includes:
@tools/check-includes.sh