Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit config #155

Merged
merged 7 commits into from
Jan 11, 2024
Merged

Add pre-commit config #155

merged 7 commits into from
Jan 11, 2024

Conversation

carlthome
Copy link
Contributor

@carlthome carlthome commented Jan 9, 2024

This is just small a suggestion. I perfectly understand if you don't think this is worth the hassle, but whenever I try to bug fix in MSAF I have to think a bit extra about how to format whitespace, etc. and would prefer if there was some typical automagic setup that just did the standard thing for me.

Since arguably black is the new default code formatter for Python these days, and pre-commit is having a strong foothold (example, example, etc.), perhaps those tools could be applied on MSAF as well?

Pros:

  1. Easier to contribute without having to think about code formatting so much ("just run black") so we can focus on numerical stuff
  2. Automatic early code review by catching style and flake errors on CI

Cons:

  1. One more step and tool to learn in order to contribute
  2. Might make code look uglier after the automatic formatting sometimes

Again, totally get if you think this is not worth the hassle! Just wanted to propose it to see how it feels! :D

@urinieto
Copy link
Owner

Oh, I've been using black+pre-commits for quite some time now, and I love it. Yes, let's do this! Thank you!

@urinieto urinieto merged commit fd28bab into urinieto:main Jan 11, 2024
4 checks passed
@carlthome carlthome deleted the add-pre-commit branch January 11, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants