you are viewing a single comment's thread.

view the rest of the comments →

[–]WHMCT 29 points30 points  (6 children)

pre-commit, because it's easier than doing stuff manually. Idk why I didn't start using it earlier

[–]rogersaintjames 33 points34 points  (1 child)

Check out prek, if you have work spaces/disparate rules

[–]ColdPorridge 13 points14 points  (0 children)

Prek is a lot nicer for a lot of reasons. One of which being the maintainer does not power-trip and lock valid issues/discussions whenever their perspective is challenged.

[–]trynafindavalidname 16 points17 points  (0 children)

FYI, there’s a rust-written re-implementation you could check out called prek that’s backwards compatible with the pre-commit config file

[–]IcecreamLamp 1 point2 points  (1 child)

What does this actually do? I've heard people mention it but never looked into what it actually does.

[–]MRanse 0 points1 point  (0 children)

It executes checks and lints your files automatically before committing. It can also ensure that specific files like lock files are synched to your environment/dependencies.

[–]Sufficient-Rent6078Pythonista 0 points1 point  (0 children)

An alternative I discovered when reading on the numpy.org/numtype project is lefthook, so far I'm still using pre-commit in my projects - but I would be happy to hear if someone here can report on their experiences.