-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add mypy
static types to qbraid-qir
#150
Conversation
openqasm
qbraid-qir
qbraid-qir
mypy
static types to qbraid-qir
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Updates look good so far!
5cd246e
to
9a53561
Compare
Also simplified and extended the logic of |
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.
Looks great! I noticed you used assert statements in a few places, which is a great way to assist the static type checker. However, just as a reminder, we should reserve assert for situations that are not expected to occur during normal operation—essentially, scenarios where it would be impossible to construct a program input that would cause the assert to fail. For conditions that could feasibly occur during normal operations, using exceptions like ValueError would be more appropriate. That said, it seems like the assert statements you've used are correctly placed for their intended purpose, so no changes are needed. Great job!
7b4b142
to
f3daa2f
Compare
Fixes #145
Summary of changes
openqasm
converterqbraid_qir.qasm3.visitor.py
qbraid_qir.cirq.*