-
Notifications
You must be signed in to change notification settings - Fork 583
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
Pre-commit hook with black #752
Comments
I set it up on my laptop, tested out the pre-commit hook - works pretty well. Didn't seem to be breaking any tests as far as I can see. The only issue being it will create a massive PR and probably cause merge conflicts in other PRs once merged, so I will wait for #747 to finish before merging this |
I've heard of it, but like the article mentions, code formatting is a touchy subject :) I'd like to see a PR with the changes to see more of what they'd entail |
I'm for anything automated, e.g. for my personal projects (kotlin) I'm not using spotless in gradle. Ultimately I've worked in enough codebases that I've learned to accept and follow the defaults that are already there. But I don't want to argue, just want to run a command to cleanup as needed. |
I agree with @yschimke. The only thing I'd argue about are 80 character line limits, those are just outdated and pointless :) |
The change is on my laptop right now, will push it to a branch at night so you guys can see how it looks. @bmoscon Black is interesting in this regard as they chose 88 as the line limit after doing some research! But it's configurable so I am not fussed about 110 as long as it's consistent. |
shashank88@e8d19ed is with the default autoformatting (88 line limit) |
I'm very pro this change |
I certainly won't do anything to stop the change, but I'm definitely anti this change. for the following reasons:
|
|
@bmoscon Do you think it's worth me resending a PR with 110 line limit? Happy to close this if you are not pro this change |
@shashank88 resend with the 110 line limit, and let's reevaluate. OSS projects have to make similar calls all the time, hopefully it's tolerable after the line limit change. |
I would argue for a 120 (or 121) character limit, based on the line length in github. |
I have been using a pre-commit hook that does auto-formatting via black in my personal projects and was thinking if it would be a good idea to do something similar here?
@bmoscon @yschimke Wdyt?
https://www.mattlayman.com/blog/2018/python-code-black/
It would require one large commit, but it should save more time going forward
The text was updated successfully, but these errors were encountered: