HomePhabricator

fix a flake8 vs autopep8 interference

Description

fix a flake8 vs autopep8 interference

Summary:
flake8 and autopep8 both detect 'Too many blank lines (E303)' and 'Expected 2 blank lines after end of function or class (E305)' style errors. This causes autopep8 to ask if the autofix should be applied instead of applying it directly, and the flake8 errors will be reported anyway on phabricator as false positives even though it was fixed (if the linting happens as part of the arc diff command).

Making flake8 ignore those errors fixes this issue. Autopep8 will apply the autofix without prompting the user.

Test Plan: Remove a blank line after a class or function, and add an extra blank line between two functions in a python file. Run arc lint, and verify that it is fixed automatically.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Oct 14 2021, 07:17
PiRKPushed on Oct 14 2021, 11:59
Reviewer
Restricted Project
Differential Revision
D10338: fix a flake8 vs autopep8 interference
Parents
rABCb214ab7d374d: test: various style improvements to abc-segwit-recovery.py
Branches
Unknown
Tags
Unknown