Re:Astral
by mixmastamyk on Tuesday April 18, 2023 @09:12PM
(#35622919)
I mentioned elsewhere but might as well here again. These tools should only be run on the files that changed, not every single one in the repo. I run my tools with the script equivalent of:
And it should exit in a split second. We have a pretty large codebase, though not gigantic.
[ Parent
| on HN ]
You might be interested in pre-commit which does exactly that!
https://pre-commit.com/
It probably will also support Ruff if it doesn't already.
Re:Astral
by mixmastamyk on Wednesday April 19, 2023 @12:53PM
(#35630457)
Yup, I know it, thanks. Think of the above as pseudo code.
Still, I want some things to run more often than commit, such as pyflakes.
Re:Astral
by globular-toast on Wednesday April 19, 2023 @05:36AM
(#35626193)
People seem to forget the three ways to make things faster in computers:
1. Micro-optimisation,
2. Better algorithms,
3. Change the problem.
The potential impact of each of these increases as you go down.
Choosing Rust over Python is micro-optimisation. All things being equal, the impact isn't going to be that great. People are like "let me squeeze out every ounce of power from my CPU so I can run a linter on the entire codebase every time I save". Python folk are like "why on earth would you do that?" We simply changed the problem.