Skip to content
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

ENH: Miscellaneous cleanup #2522

Merged
merged 7 commits into from
Feb 18, 2022
Merged

ENH: Miscellaneous cleanup #2522

merged 7 commits into from
Feb 18, 2022

Conversation

jhlegarreta
Copy link
Contributor

@jhlegarreta jhlegarreta commented Feb 18, 2022

  • DOC: Document missing parameters
  • ENH: Remove unused import statement
  • ENH: Remove unused local variables
  • ENH: Remove unused method parameter
  • STYLE: Remove redundant parentheses
  • STYLE: Simplify chained comparisons
  • DOC: Fix spelling mistakes

@jhlegarreta
Copy link
Contributor Author

By no means this intends to be exhaustive: I just visited these files and my editor was prompting me with these things.

Copy link
Member

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jhlegarreta, always good to have some code cleaning PR.

See my comments below. I think the tests are failing because of that. You remove the wrong one.

dipy/reconst/tests/test_cross_validation.py Outdated Show resolved Hide resolved
Document missing parameters and remove documentation of parameters that
are no longer present.
Remove unused import statement.
@jhlegarreta jhlegarreta force-pushed the MiscCleanUp branch 2 times, most recently from 0728c08 to e119d5d Compare February 18, 2022 02:25
Remove unused local variables.

Fixes warning:
```
Local variable 'sqrtC' value is not used
```

And similar other warnings.
Remove unused method parameter.

Fixes warning:
```
Parameter 'dtype' value is not used
```
Remove redundant parentheses.
Copy link
Contributor

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up! I had a couple of specific suggestions

dipy/reconst/tests/test_shore_metrics.py Outdated Show resolved Hide resolved
dipy/reconst/tests/test_shore_metrics.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #2522 (ae320ae) into master (02207fe) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2522      +/-   ##
==========================================
- Coverage   84.85%   84.85%   -0.01%     
==========================================
  Files         126      126              
  Lines       17151    17148       -3     
  Branches     2914     2914              
==========================================
- Hits        14554    14551       -3     
  Misses       1926     1926              
  Partials      671      671              
Impacted Files Coverage Δ
dipy/direction/peaks.py 84.57% <ø> (ø)
dipy/reconst/forecast.py 90.04% <ø> (ø)
dipy/reconst/mapmri.py 90.57% <ø> (ø)
dipy/reconst/qtdmri.py 92.24% <100.00%> (-0.03%) ⬇️

Simplify chained comparisons by splitting them into two statements.
Fix spelling mistakes in docstrings/comments.
@skoudoro
Copy link
Member

All concerns have been fixed, thank you @arokem for the review, and thanks @jhlegarreta for the code cleaning. merging

@skoudoro skoudoro merged commit 5180727 into dipy:master Feb 18, 2022
@jhlegarreta jhlegarreta deleted the MiscCleanUp branch February 18, 2022 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants