jwcrypto icon indicating copy to clipboard operation
jwcrypto copied to clipboard

chore(quality): add quality tools

Open stegayet opened this issue 2 years ago • 2 comments
trafficstars

Description

This PR intends to add quality tools (flake8, black, pyupgrade, mypy), locally using pre-commit and in the CI.

Technical details

  • Add flake8 and run the tool on the codebase
  • Add black and run the tool on the codebase
  • Add pyupgrade and run the tool on the codebase
  • Add mypy and run the tool on the codebase

TODO

  • [ ] Add related documentation in README
  • [ ] Add CI checks
  • [ ] Finish mypy integration
  • [ ] Add isort
  • [ ] Add check-yaml

Future work

  • With mypy running on the codebase, add py.typed marker so that library usage of external projects can also be type-checked.

stegayet avatar Jan 03 '23 21:01 stegayet

Looks like this PR is making a massive amount of trivial changes. Can you please match the ignores already present in tox.ini ?

I am all for more linters, but I am not going to accept massive changes where all that changes is the type of python quoting used or similar changes, the code base is to big and mature for that kind of change, it would clobber history (git blame) for no good reason.

simo5 avatar Jan 03 '23 23:01 simo5

Agreed, I'll proceed to changes and ping you once this PR is ready to be reviewed :+1:

stegayet avatar Jan 04 '23 07:01 stegayet