Conversation
| commands = | ||
| ruff check --fix . | ||
| ruff format . | ||
| pre-commit run -a |
There was a problem hiding this comment.
can we avoid this? I'm happy to see config for pre-commit shipped, but don't really want to add it as a hard dependency.
There was a problem hiding this comment.
The concern with not doing this is that you end with two linter configurations which may subtly differ. This usually means someone who uses pre-commit will end up getting a whole load of fixes on unrelated code because others haven't run it for X time.
More to the point, I don't think there's really a dependency here. It's not needed at runtime. Distro packagers don't need to worry about. Devs don't need to even install it on their system since they can just rely on tox to do so. (I also wouldn't call tox a dependency for similar reasoning)
There was a problem hiding this comment.
So I'm happy to see pre-commit config added if people find that helpful. It does add extra overhead in cases that aren't really precommits (i.e. CI) and I don't personally use it.
We already have configuration for ruff, tox, CI, testr as well as a Makefile that all have config for how to run tests/linting/etc.
We can use tox for this nowadays. Signed-off-by: Stephen Finucane <stephen@that.guru>
2fbc4bb to
9dcff1b
Compare
Signed-off-by: Stephen Finucane <stephen@that.guru>
9dcff1b to
9b77989
Compare
|
Let me hold this for a bit while I investigate hatch envs. Maybe we can call that from pre-commit and get the best of both worlds. We might even be able to get rid of tox from the looks of things. |
|
I yeeted tox from most of my projects in favour of Hatch. It's so much nicer and you can set up scripts that run in the venv context, such as calls to formatting tools 😉 |
Seeing as I keep forgetting to run ruff when submitting PRs 😅