Configuration for Code Style Checker¶
Overview¶
flake8 is a powerful tool for enforce for coding style for all team when working with Python in the environments.
Detail¶
The metadata option support you to clean more code
Add required package in the requirment
Then at the root project folder we add the configuration file to set up.
tox.ini
[flake8]
# https://flake8.pycqa.org/en/latest/user/configuration.html
# Options List: https://flake8.pycqa.org/en/latest/user/options.html
ignore =
C901
E131
E701
E402
E502
D203
E211
exclude =
.git,
.vscode,
asset,
logs,
temp,
venv,
old,
build,
dist
backend/.tox/
max-complexity = 15
disable-noqa = False
count = True
show-source = True
statistics = True
max-line-length = 180
Reference¶
https://flake8.pycqa.org/en/latest/user/configuration.html
https://flake8.pycqa.org/en/latest/user/options.html