Member
Removes sort-all since ruff now supports sorting __all__. Also adds 2 more ruff rules:
Also forces pre-commit to use python 3.12, to ensure consistency between different hooks and between locally run pre-commit and CI pre-commit
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Looks like you edited the (optional) requirements or the pre-commit hooks. I'm just a friendly reminder to keep the additional dependencies for the hooks in sync with the requirements :)
Member Author
huh, my pre-commit did not report those errors (differences in python version?).. also it seems like SIM401 was silently being ignored all this time? It's not a preview rule so not sure how ruff didn't catch that before..
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
different python version could certainly be. ruff always wants me to use typing.Self when running on py3.11 …
Member Author
Interesting thing I found about pre-commit - new contributors will not need to run pre-commit install whenever they clone our repo, if we do this. It will automatically install the hooks during cloning and run them on git commit. I can try doing this on another PR.
Member Author
Interesting thing I found about
pre-commit- new contributors will not need to runpre-commit installwhenever they clone our repo, if we do this. It will automatically install the hooks during cloning and run them ongit commit. I can try doing this on another PR.
well I misunderstood what that option is for. It's only meant for local setups where you want your git to automatically install the .pre-commit-config.yaml from repositories to .git/hooks. We can't instruct others' git to do that (which makes sense since the INSTALL_PYTHON variable in .git/hooks/pre-commit differs according to where python is installed in your system).
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :) Is there anything left from your side or should I merge?