Flake8 is a popular lint wrapper for python. Under the hood, it runs three other tools and combines their results:
The mozlint integration of flake8 can be run using mach:
$ mach lint --linter flake8 <file paths>
Alternatively, omit the
--linter flake8 and run all configured linters, which will include
Path configuration is defined in the root .flake8 file. Please update this file rather than
tools/lint/flake8.yml if you need to exclude a new path. For an overview of the supported
configuration, see flake8’s documentation.
The flake8 linter provides a
--fix option. It is based on autopep8.
Please note that autopep8 does NOT fix all issues reported by flake8.