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
STYLE: Fix miscellaneous Python warnings #2606
Conversation
jhlegarreta
commented
May 28, 2022
•
edited
edited
- DOC: Use triple double-quoted strings in docstrings
- STYLE: Avoid array-like mutable default argument values
- STYLE: Avoid re-declaring variables in nested for loops
- STYLE: Replace function call with set literal
- STYLE: Simplify chained comparisons
- STYLE: Avoid shadowing built-in names
Conform to PEP 257: use triple double-quoted strings in docstrings. Fixes: ``` Triple double-quoted strings should be used for docstrings. ```
Avoid array-like mutable default argument values. Fixes: ``` Default argument value is mutable ``` Change the docstrings accordingly.
Remove redundant parentheses. Fixes: ``` Remove redundant parentheses ```
Avoid re-declaring variables in nested `for` loops. Fixes e.g.: ``` Variable 'dim' is already declared in 'for' loop or 'with' statement above ```
Replace function call with set literal. Fixes: ``` Function call can be replaced with set literal ```
Hello @jhlegarreta, Thank you for updating ! Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated at 2022-05-29 19:17:47 UTC |
8606dcc
to
ac4b478
Compare
@@ -679,7 +679,7 @@ def l_shore(radial_order): | |||
|
|||
|
|||
def n_shore(radial_order): | |||
"Returns the angular regularisation matrix for SHORE basis" | |||
"""Returns the angular regularisation matrix for SHORE basis""" |
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.
BTW, the l_shore
, and n_shore
methods are exactly the same. I have not found the equations in the paper. If they should be the same, then only one method should exist.
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.
Maybe @maurozucchelli has an answer concerning l_shore and n_shore?
Codecov Report
@@ Coverage Diff @@
## master #2606 +/- ##
==========================================
- Coverage 84.27% 84.26% -0.01%
==========================================
Files 130 130
Lines 17914 17916 +2
Branches 3051 3051
==========================================
Hits 15097 15097
- Misses 2102 2104 +2
Partials 715 715
|
Failing build is |
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.
Hi @jhlegarreta,
Thank you for this PR. It is almost ready to go. See below for some comments.
@@ -679,7 +679,7 @@ def l_shore(radial_order): | |||
|
|||
|
|||
def n_shore(radial_order): | |||
"Returns the angular regularisation matrix for SHORE basis" | |||
"""Returns the angular regularisation matrix for SHORE basis""" |
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.
Maybe @maurozucchelli has an answer concerning l_shore and n_shore?
ac4b478
to
4e9cab5
Compare
Same failure as for the previous commit, |
Simplify chained comparisons. Fixes: ``` Too complex chained comparisons. ```
Rename method parameters and local variables to avoid shadowing built-in names. Fixes e.g. ``` Shadows built-in name 'bytes' ```
4e9cab5
to
cc31f08
Compare
LGTM ! Thank you @jhlegarreta |