HomePhabricator

[lint] bump flake8 to >5

Description

[lint] bump flake8 to >5

Summary:
Flake8 5.x has a --require-plugins option that could be useful using some of the many flake8 plugins, such as flake8-comprehensions or flake8-simplify..
Without this option, we could already use the plugins, but we cannot enforce their usage. Users would not be warned if they run arc lint without the required plugin installed.

Bumping the flake8 version raises two E275 missing whitespace after keyword errors, because assert is incorrectly used like a function rather than like a keyword.

Note that 6.0.0 is the latest version available, but it requires python>=3.8.1, so I didn't use >6 in .arclint because we still support python 3.6. Debian Bullseye has python 3.9, so 6.0.0 is fine for that distro. I checked that both flake8 5.0.4 and 6.0.0 produce the same results for our codebase.

Test Plan:

arc lint --everything

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Apr 9 2023, 17:08
PiRKPushed on Apr 10 2023, 09:58
Reviewer
Restricted Project
Differential Revision
D13646: [lint] bump flake8 to >5
Parents
rABCbd0a8f9bf76f: [lint] run mypy on contrib
Branches
Unknown
Tags
Unknown