This PR introduces basic type checkers and formatters for python, namely isort, flake8, mypy and brunette. brunette is chosen over black only because it can be configured in .cfg file with all other libraries. pytest is not introduced yet as it should probably be different PR with actual unit tests (and I am not sure if pytest is the way for django).
There is also a Makefile for easy way to run all tests with simple make test command in CLI of your choice (with make utility). The Makefile is handy but should not replace pre-commit hooks.
The configuration settings in setup.cfg are just suggestions (well, this whole PR is and can be ignored).
Last note: there are a lot of 'type: ignore' comments for mypy to run successfully – some are because of django itself (it is not really typed) but many could be avoided, it would however actually changed the code and that is something this PR avoids (except for imports...).
This PR introduces basic type checkers and formatters for python, namely
isort
,flake8
,mypy
andbrunette
.brunette
is chosen overblack
only because it can be configured in.cfg
file with all other libraries.pytest
is not introduced yet as it should probably be different PR with actual unit tests (and I am not sure ifpytest
is the way fordjango
).There is also a
Makefile
for easy way to run all tests with simplemake test
command in CLI of your choice (withmake
utility). TheMakefile
is handy but should not replace pre-commit hooks.The configuration settings in
setup.cfg
are just suggestions (well, this whole PR is and can be ignored).Last note: there are a lot of 'type: ignore' comments for
mypy
to run successfully – some are because ofdjango
itself (it is not really typed) but many could be avoided, it would however actually changed the code and that is something this PR avoids (except for imports...).