Flake8 (Pycodestyle, McCabe, pyflakes)
PythonFlake8PycodestyleMcCabepyflakes
PythonFlake8PycodestyleMcCabepyflakes
Published:
Table of content
Flake8
Flake8
is a code quality checker for Python that combines the features of Pycodestyle
, McCabe
, and pyflakes
to provide a comprehensive tool for checking your code against style conventions, complexity, and potential errors.
There are also plugins available for Flake8
that extend its functionality to include additional checks and features. Such are:
pep8-naming
for checking naming conventionsflake8-docstrings
for checking docstringsflake8-bugbear
for additional checks beyond PEP 8flake8-mypy
for type checking with Mypy
Beofre commiting you code or putting it online, just run
flake8
to check for any issues.
Installing Flake8
You can install Flake8
using pip:
pip install flake8
# or
conda install flake8
Checking Code
You can check your Python code using Flake8
by running the following command:
flake8 your_file.py