-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fix issues raised by pylint #205
Conversation
58fda1f
to
1638697
Compare
Codecov Report
@@ Coverage Diff @@
## master #205 +/- ##
========================================
+ Coverage 95.9% 96.0% +0.1%
========================================
Files 146 146
Lines 2961 2954 -7
Branches 725 728 +3
========================================
- Hits 2840 2838 -2
+ Misses 76 71 -5
Partials 45 45
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
6df592b
to
da6ee7b
Compare
572b622
to
e9de123
Compare
e9de123
to
b23aa80
Compare
71530f5
to
95dad08
Compare
@vprusso I chose to ignore all the redefinition errors raised by pylint in 95dad08. Let me know if you would prefer I refactor those code lines in some way instead. Edit: Same thing for the unsubscriptable errors in f9dca8b. Because a function allows for both int and array/list inputs, the easiest path was to disable them wherever possible. Edit2: I think 8d59bbd was flagged as an error due to a bug in |
Ready for a review. |
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.
A couple of minor comments, but overall this looks great! Excellent job, @purva-thakre !
@@ -1,10 +1,10 @@ | |||
"""Is matrix a positive definite matrix.""" | |||
import numpy as np | |||
|
|||
from toqito.matrix_props import is_hermitian | |||
from toqito.matrix_props import is_hermitian # pylint: disable=unused-import |
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.
If this import is not used, we perhaps want to remove it.
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.
No. This is a bug in pylint. We use this import but pylint thinks we are not using it.
Edit: This line is also causing issues in the module not found
error discussed in this comment.
Maybe pylint is also catching the same issue here?
edit3: Same issue is flagged in a 3.10 run. Edit2:Now, the changes made in the previous commit are flagged as problematic in a 3.11 run. Might be related to the deprecation warning fixed in #210 Edit: Fixed by a07e214 Apparently, this is raised by my local virtual environment using py311
Original Message:
In
But for |
@vprusso Except for the two unresolved comments #205 (comment), #205 (comment) this is ready for another review. I think they are closely related to the warnings raised by pytest. |
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.
LGTM! Merge when ready!
* all pylint issues in tests/ * state_props:eof * python install * pylint userwarning * remove exception and from future annotations * import lines * matrix_props/is_positive_def * fixes Make parameter typing consistent in doc examples #209 * state_metrics/fid_of_sep * channel_props/is_trace_preserving * nonlocalgame * useless suppression * quick fixes * all redefinition disabled * all unsubscriptable object * possibly unbalanced tuples * unnecessary-list-index-lookup * black reformatter no pylint issues * black reformatter pylint issues * test useless supression * Fixes #205 (comment) * Fixes #205 (comment) * Fixes #205 (comment) * fixes #205 (comment) + black reformatter
* test_channel_metrics * fix #205 (comment) * scipy/sparse find_common_type deprecation * ignore warnings related to cvxpy * try ignore all cvxpy warnings * try: ignore a line in a third party package * try whole path * try: omit virtualenvs * add coveragerc to pytest path * upgradepytest cov version * remove coverage * numpy: Ensure you extract a single element * upgrade coverage * Revert "scipy/sparse find_common_type deprecation" This reverts commit fb9d3a0. * update toml * comment out matsumoto fidelity failure * test: don't ignore cvxpy * pylint + cleanup * no else return * upgrade scipy
Description
Fixes #198
Todos
Notable points that this PR has either accomplished or will accomplish.
Questions
Status