Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
effigies merged 12 commits intonipy:masterfromeffigies:sty/normalize
Jan 1, 2023
Merged

Conversation

@effigies
Copy link
Member

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:

[flake8]max-line-length = 99extend-ignore = E203,E266,E402,E731exclude =    *test*    *sphinx*    nibabel/externals/*    */__init__.py[blue]line_length = 99extend-exclude = _version.py[isort]extend_skip = _version.pyprofile = blackline_length = 99

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?

ZviBaratz reacted with hooray emoji
@codecov
Copy link

codecovbot commentedJul 23, 2022
edited
Loading

Codecov Report

Base:92.38% // Head:92.38% // Increases project coverage by+0.00% 🎉

Coverage data is based on head(69785cd) compared to base(0a6e73e).
Patch coverage: 91.72% of modified lines in pull request are covered.

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
Impacted FilesCoverage Δ
nibabel/environment.py95.00% <ø> (ø)
nibabel/imagestats.py83.33% <0.00%> (ø)
nibabel/nicom/structreader.py100.00% <ø> (ø)
nibabel/nicom/utils.py100.00% <ø> (ø)
nibabel/onetime.py90.47% <ø> (ø)
nibabel/pkg_info.py73.91% <ø> (ø)
nibabel/streamlines/tck.py99.48% <ø> (-0.01%)⬇️
nibabel/streamlines/tractogram.py99.68% <ø> (ø)
nibabel/streamlines/tractogram_file.py100.00% <ø> (ø)
nibabel/streamlines/trk.py94.00% <ø> (-0.02%)⬇️
... and96 more

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.
📢 Do you have feedback about the report comment?Let us know in this issue.

@effigieseffigiesforce-pushed thesty/normalize branch 3 times, most recently from13d8a15 to06aa591CompareJuly 27, 2022 03:17
@effigieseffigies changed the base branch frommaster tomaint/4.0.xJuly 27, 2022 11:37
@effigies
Copy link
MemberAuthor

In the absence of feedback, I plan to push on this as time allows and merge when satisfied.

DimitriPapadopoulos reacted with thumbs up emoji

@effigieseffigies changed the base branch frommaint/4.0.x tomasterSeptember 11, 2022 18:07
@effigieseffigiesforce-pushed thesty/normalize branch 4 times, most recently from3e22a51 to2eceee6CompareSeptember 11, 2022 20:56
@ZviBaratz
Copy link
Contributor

How 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 updateblue with your PR having been merged. LMK if there's anything I can do to help with this.

effigiesand others added4 commitsDecember 30, 2022 09:05
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]
@effigieseffigiesforce-pushed thesty/normalize branch 5 times, most recently frombd4d8fc tof1a85f8CompareJanuary 1, 2023 00:45
effigiesand others added3 commitsDecember 31, 2022 19:55
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]
@effigies
Copy link
MemberAuthor

Let's break all the PRs...

ZviBaratz reacted with hooray emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

5.0.0

Development

Successfully merging this pull request may close these issues.

2 participants

@effigies@ZviBaratz

[8]ページ先頭

©2009-2025 Movatter.jp