HomePhabricator

tests/tools: Enable additional Python flake8 rules for automatic linting

Description

tests/tools: Enable additional Python flake8 rules for automatic linting

Summary:

Enabled rules:

* E242: tab after ','
* E266: too many leading '#' for block comment
* E401: multiple imports on one line
* E402: module level import not at top of file
* E701: multiple statements on one line (colon)
* E901: SyntaxError: invalid syntax
* E902: TokenError: EOF in multi-line string
* F821: undefined name 'Foo'
* W293: blank line contains whitespace
* W606: 'async' and 'await' are reserved keywords starting with Python
3.7

Backport of core PR12987
https://github.com/bitcoin/bitcoin/pull/12987/files

Depends on D3770

Test Plan:

./test/functional/test_runner.py interface_rest
arc lint --everything

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3771

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Apr 16 2018, 09:13
FabienCommitted on Aug 5 2019, 07:07
FabienPushed on Aug 5 2019, 07:07
Reviewer
Restricted Project
Differential Revision
D3771: tests/tools: Enable additional Python flake8 rules for automatic linting
Parents
rABCa95d5f895de2: [tests] simplify binary and hex response parsing in interface_rest.py
Branches
Unknown
Tags
Unknown