🔧 Replace mypy with ty - #912
Conversation
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughReplace mypy with ty across CI, pre-commit, and pyproject; switch Qiskit typing to BackendV2/Target; adapt tableau attribute names; migrate visualization to Plotly FigureWidget; add runtime test assertions; remove an example test file; update CHANGELOG. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
burgholzer
left a comment
There was a problem hiding this comment.
This looks great. I just have one comment that I was not quite sure about.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@python/mqt/qmap/plugins/qiskit/sc/load_architecture.py`:
- Around line 18-21: Update the load_architecture docstring to mention BackendV2
explicitly: in the function load_architecture(arch: str | Arch | Architecture |
BackendV2 | None = None) replace the line that currently says “or Backend” with
“or BackendV2” (or a phrase like “or BackendV2 backend”) and ensure the first
sentence clearly lists the accepted types (str, Arch, Architecture, or
BackendV2) and that passing None loads no architecture.
In `@python/mqt/qmap/visualization/visualize_search_graph.py`:
- Around line 1164-1166: The type check for search_edges_width currently rejects
integers by requiring float; update the validation to accept any numeric type
(e.g., int or float or better numbers.Real) and still enforce > 0, changing the
error message to "must be a positive number"; apply the same fix to the
analogous validation for search_stems_width (the checks around the symbols
search_edges_width and search_stems_width).
Description
This PR replaces
mypywithty.Checklist:
I have added appropriate tests that cover the new/changed functionality.I have updated the documentation to reflect these changes.I have added migration instructions to the upgrade guide (if needed).