- Notifications
You must be signed in to change notification settings - Fork269
STY: Normalize to blue and isort#1124
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecovbot commentedJul 23, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportBase:92.38% // Head:92.38% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@## master #1124 +/- ##======================================= Coverage 92.38% 92.38% ======================================= Files 98 98 Lines 12264 12257 -7 Branches 2520 2520 =======================================- Hits 11330 11324 -6+ Misses 613 612 -1 Partials 321 321
Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here. ☔ View full report at Codecov. |
13d8a15 to06aa591CompareIn the absence of feedback, I plan to push on this as time allows and merge when satisfied. |
3e22a51 to2eceee6CompareHow do you feel about specifying: [flake8]...per-file-ignores = */__init__.py: F401 forinit files? Or are there other codes we should be ignoring? Otherwise, I think it would be great to move forward with this. We can always revert changes in particular files or sections if we find it less readable, and hopefully at some point we will be able to update |
Run with a custom patch to avoid realigning inline comments:pipx run --spec git+https://github.com/effigies/blue.git@fix/hanging-comments blue nibabel[git-blame-ignore-rev]
[git-blame-ignore-rev]
bd4d8fc tof1a85f8Compare[git-blame-ignore-rev]
Add fmt off/on guards for tabular comments[git-blame-ignore-rev]
Mostly motivated by excessive use of arguments to super().Also caught a number of `np.array(X).astype(Y)` to convert to`np.array(X, Y)`.[git-blame-ignore-rev]
Let's break all the PRs... |
Looking at#1114, I think we're past the days of asking people to follow style guides. Code formatters have gotten a lot better in the last decade, and it makes more sense to just give people the configuration to auto-format.
Here I'm proposing we useblue, which is like black but doesn't insist on double-quotes everywhere.
I'm also suggestingisort just because I've seen a number of PRs where people's editors auto-sort imports for them, so let's just tell their editors what to do.
The style config becomes:
There are some things I want to revert and protect from re-formatting, most notably the NIfTI intent recoder. But on the whole I find very little objectionable and some things look noticeably better. Any objections / other things to revert and protect?