liesel-devs / liesel

A probabilistic programming framework
https://liesel-project.org
MIT License
38 stars 2 forks source link

Use black preview in pre-commit #177

Closed jobrachem closed 5 months ago

jobrachem commented 6 months ago

This PR simply adds the line args: [--preview] to the black configuration for our pre-commit. I think this is nice predominantly because this includes automatic formatting of long strings, which can be quite annoying. But there's another nice stuff, too, see here: https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html For example, dictionary and list formatting was also improved.

jobrachem commented 6 months ago

P.S.: The changes to other files than the pre-commit config are due to black's updated behavior, as far as I can see.

jobrachem commented 5 months ago

@GianmarcoCallegher thanks! You can usually safely delete the branches after merging :)

GianmarcoCallegher commented 5 months ago

@GianmarcoCallegher thanks! You can usually safely delete the branches after merging :)

I always forget that. Sorry :(