-
Notifications
You must be signed in to change notification settings - Fork 258
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
STY: Apply ruff preview rules #1369
Conversation
87ec393
to
c698c5e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1369 +/- ##
=======================================
Coverage 95.37% 95.37%
=======================================
Files 207 207
Lines 29668 29668
Branches 4991 4990 -1
=======================================
Hits 28296 28296
Misses 932 932
Partials 440 440 ☔ View full report in Codecov by Sentry. |
@@ -699,7 +699,7 @@ def set_zooms(self, zooms): | |||
ndim = dims[0] | |||
zooms = np.asarray(zooms) | |||
if len(zooms) != ndim: | |||
raise HeaderDataError('Expecting %d zoom values for ndim %d' % (ndim, ndim)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, does ndim
really must appear twice in the error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's reasonable to say you were expecting N zooms for an N-dim image. I think it would also make sense to rewrite something along the lines of "Zooms must have one value per dimension (ndim={ndim}). Received: {zooms}."
c698c5e
to
53a9ea1
Compare
8164f9d
to
aec7b3d
Compare
aec7b3d
to
06736c1
Compare
39dec9b
to
b75eb13
Compare
UP031 Use format specifiers instead of percent format Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
FURB145 Prefer `copy` method over slicing
FURB148 `enumerate` index is unused, use `for x in y` instead
FURB157 Verbose expression in `Decimal` constructor
FURB192 Prefer `min` over `sorted()` to compute the minimum value in a sequence
C409 Unnecessary list comprehension passed to `tuple()` (rewrite as a generator)
C419 Unnecessary list comprehension
b75eb13
to
b33bcde
Compare
Co-authored-by: Chris Markiewicz <[email protected]>
No description provided.