-
Notifications
You must be signed in to change notification settings - Fork 208
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: typing compatibility with rustworkx 0.13.0 #1202
fix: typing compatibility with rustworkx 0.13.0 #1202
Conversation
This change should be reverted once rustworkx 0.13.1 has fixed this typing incompatibility.
Pull Request Test Coverage Report for Build 5209060114
💛 - Coveralls |
@@ -217,7 +217,14 @@ jobs: | |||
source "$CONDA/etc/profile.d/conda.sh" | |||
conda activate psi4env | |||
make mypy |
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 imagine you could have done a simple if else around the make mypy to do it one way or another depending on whether python version was 3.7 or not - akin to what is done in line 176 above. But this does the job too.
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.
Ha I failed to see that other example and simply zoomed in on the local part here and this seemed good enough 👍
* fix: typing compatibility with rustworkx 0.13.0 * fix: update copyright * hotfix: avoid mypy warning about unused ignores This change should be reverted once rustworkx 0.13.1 has fixed this typing incompatibility. (cherry picked from commit 08df681)
* fix: typing compatibility with rustworkx 0.13.0 (#1202) * fix: typing compatibility with rustworkx 0.13.0 * fix: update copyright * hotfix: avoid mypy warning about unused ignores This change should be reverted once rustworkx 0.13.1 has fixed this typing incompatibility. (cherry picked from commit 08df681) * fix: backport mypy updates to legacy code locations --------- Co-authored-by: Max Rossmannek <[email protected]>
Summary
Makes mypy happy due to the new typing support of rustworkx 0.13.0
So far, this is only a partial typing support which mypy does not seem to pick up on, despite https://github.com/Qiskit/rustworkx/blob/58fdd933cd81c576a3cc02c8a6b7b4e4646ea9c3/rustworkx/py.typed#L1
Details and comments
The constraint for Python 3.7 is due to Qiskit/rustworkx#893