mirror of
https://github.com/initialcommit-com/git-sim.git
synced 2026-04-27 03:25:53 +03:00
[GH-ISSUE #23] Suggestion: Can we use a formatter (e.g black)? #18
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-sim#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paketb0te on GitHub (Jan 25, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/23
IMO a formatter like
blackimproves readability and consistency of the code, maybe that could be something to adopt?Just an idea, let me know what you think @initialcommit-io
(most editors / IDEs support some sort of "format-on-save" functionality AFAIK, or it could be set up as a pre-commit hook I guess...)
@initialcommit-io commented on GitHub (Jan 26, 2023):
@paketb0te Yes I am open to this, I use Vim so maybe I could use a pre-commit hook like you suggested. Let me look into the formatter and some other options and I'll get back to you.
@initialcommit-io commented on GitHub (Jan 27, 2023):
@paketb0te Let's do it. I asked @marksmayo to resubmit a PR for this which I will merge. Then we can use black going forward. Thanks for the suggestion!
Any other special notes on using black that we should be aware of? This will be my first time using it.
@paketb0te commented on GitHub (Jan 27, 2023):
@initialcommit-io no, it has good defaults, we can just run it as-is IMO.
Only thing to keep in mind: It will reformat all files, so whoever runs the formatting and then commits back to the repo will be the author of the last change for everything (e.g. if you do a
git blame, the person who did the reformatting wil show up (until a new commit made changes of course), instead of the "original" author. Therefore I suggest that YOU run the formatting and commit it, because you wrote 99% of the code...@initialcommit-io commented on GitHub (Jan 27, 2023):
Good point. I will do the formatting now with black, and if there is some import cleanup or commas to be added as in the pull request, @marksmayo can clean that up.
@initialcommit-io commented on GitHub (Jan 27, 2023):
Reformatted and pushed in as a part of v0.1.6
Closing this - all contributors please use black for formatting going forward.