DejvB / BoardGameApp

1 stars 0 forks source link

Testing suite #35

Closed AdamLaf closed 1 year ago

AdamLaf commented 2 years ago

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...).