add pyflakes to detect unused imports, variables and other issues

parent 349680a2
# tools/dependencies required for development or running tests
autopep8
autoflake
isort
pylama
pytest-cov
......
......@@ -6,7 +6,7 @@ max_line_length = 120
[pylama]
skip = failmap_admin/*/migrations/*.py
linters = isort,pycodestyle
linters = isort,pycodestyle,pyflakes
[isort]
line_length=100
......
......@@ -42,10 +42,16 @@ commands =
[testenv:autofix]
# install all dependencies so isort knows packages belong where
deps =
-rrequirements.txt
# install dev requirements for required tools
-rrequirements.dev.txt
# install package dependencies to make sure isort known third party packages
-rrequirements.txt
commands =
# fix trivial pep8 style issues
autopep8 -ri failmap_admin tests setup.py
# remove unused imports
autoflake -ri --remove-all-unused-imports failmap_admin tests setup.py
# sort imports
isort -rc failmap_admin tests setup.py
# do a check after autofixing to show remaining problems
pylama failmap_admin tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment