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

fix: typing compatibility with rustworkx 0.13.0 #1202

Merged

Conversation

mrossinek
Copy link
Member

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

@mrossinek mrossinek added priority: critical stable backport potential The bug might be minimal and/or import enough to be port to stable labels Jun 8, 2023
mrossinek added 2 commits June 8, 2023 10:18
This change should be reverted once rustworkx 0.13.1 has fixed this
typing incompatibility.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5209060114

  • 5 of 5 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.453%

Totals Coverage Status
Change from base Build 5183553132: 0.0%
Covered Lines: 9403
Relevant Lines: 10752

💛 - Coveralls

@@ -217,7 +217,14 @@ jobs:
source "$CONDA/etc/profile.d/conda.sh"
conda activate psi4env
make mypy
Copy link
Member

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.

Copy link
Member Author

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 👍

@mrossinek mrossinek merged commit 08df681 into qiskit-community:main Jun 8, 2023
mergify bot pushed a commit that referenced this pull request Jun 8, 2023
* 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)
@mrossinek mrossinek deleted the fix-rustworkx-compatibility branch June 8, 2023 13:58
mergify bot added a commit that referenced this pull request Jun 8, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: critical stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants