Repository navigation
Use ruff and refurb on remainder of plasmapy - #1853
Conversation
|
Thank you for contributing to PlasmaPy! The project's future depends deeply on contributors like you, so we deeply appreciate it! 🌱 The following checklist will be used by the code reviewer to help guide the code review process.
|
Codecov ReportBase: 98.31% // Head: 98.31% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1853 +/- ##
==========================================
- Coverage 98.31% 98.31% -0.01%
==========================================
Files 95 95
Lines 8378 8372 -6
==========================================
- Hits 8237 8231 -6
Misses 141 141
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
| vspace1_args = { | ||
| "x_range": [0, 10], | ||
| "y_range": [0, 10], | ||
| "z_range": [0, 10], | ||
| "precision": [10 / 46, 10 / 46, 10 / 46], | ||
| "func": vspace_func_1, | ||
| } | ||
| vspace1 = _vector_space(**vspace1_args) |
There was a problem hiding this comment.
This wasn't being used later.
| W = 15e6 | ||
|
|
||
| l = 10 | ||
| l = 10 # noqa: E741 |
There was a problem hiding this comment.
The E741 code corresponds to potentially ambiguous variable names, like l which can be confused with 1.
| wavelengths = (wavelengths * u.m).to(u.nm) | ||
|
|
||
| true_params = copy.deepcopy(params) | ||
| true_params = copy.deepcopy(params) # noqa: F841 |
There was a problem hiding this comment.
true_params isn't used later, but it could be helpful using the pytest flag to show local variables.
| output = [] | ||
| for arg in range(len(args)): | ||
| output.append(vals[:, arg] * self._interp_units[arg]) | ||
| output = [vals[:, arg] * self._interp_units[arg] for arg in range(len(args))] | ||
|
|
||
| if len(output) == 1: | ||
| return output[0] | ||
| else: | ||
| return tuple(output) | ||
| return output[0] if len(output) == 1 else tuple(output) |
There was a problem hiding this comment.
Sourcery helped me out with these ones.
| (cp_candidates[threshold_indices] + 1, [cp_candidates[-1] + 1]) | ||
| ) | ||
| rtn_extras["islands"] = [ | ||
| rtn_extras["islands"] = [ # noqa: FURB140 |
There was a problem hiding this comment.
This one was to use itertools.starmap, which started to make my brain hurt.
This PR applies changes from
ruffandrefurbon a few other subpackages. This follows up on #1845, #1846, and #1847.