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

update files to conform to new mypy standard #6662

Merged
merged 7 commits into from
Jul 10, 2024

Conversation

NoureldinYosri
Copy link
Collaborator

this changes updates code to conform to the new mypy standard.

Note that cirq-rigetti needs a lot of work so I temporarily turned off mypy checks for it and filed #6661 to track that work.

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.81%. Comparing base (32d4833) to head (bcf256a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6662      +/-   ##
==========================================
- Coverage   97.81%   97.81%   -0.01%     
==========================================
  Files        1066     1066              
  Lines       91832    91833       +1     
==========================================
  Hits        89826    89826              
- Misses       2006     2007       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@senecameeks senecameeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix! One small question before approving

@@ -899,6 +899,8 @@ def test_cphase_unitary(angle_rads, expected_unitary):
np.testing.assert_allclose(cirq.unitary(cirq.cphase(angle_rads)), expected_unitary)


# TODO(#6663): fix this use case.
@pytest.mark.xfail
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this stopped working? If just the latter assertion is broken can we break it out into it's own test and mark it as failed / track a fix for it, WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like either comparison between sympy numbers and floats changed or something changed that changes the functions called during comparison ... either way I opened #6663 to fix it.

@@ -1,5 +1,5 @@
[mypy]
exclude = dev_tools/modules_test_data/.*/setup\.py
exclude = dev_tools/modules_test_data/.*/setup\.py|cirq-rigetti/(?!__init__.)*\.py # Temperarly exclude cirq-rigetti (see #6661)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily

@NoureldinYosri NoureldinYosri enabled auto-merge (squash) July 10, 2024 18:16
@NoureldinYosri NoureldinYosri merged commit 590a9f5 into quantumlib:main Jul 10, 2024
32 checks passed
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
this changes updates code to conform to the new mypy standard. 

Note that cirq-rigetti needs a lot of work so I temporarily turned off mypy checks for it and filed quantumlib#6661 to track that work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants