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

Change type signature of cirq.resolve_parameters to preserve types #3922

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

maffoo
Copy link
Contributor

@maffoo maffoo commented Mar 17, 2021

Fixes #3390

Only had to modify a couple of places where mypy complained about types in DiagonalGate and TwoQubitDiagonalGate, which accepted List but stored a tuple internally. Also had to add a couple of casts in resolve_parameters, but I've tried to document what's going on there.

@maffoo maffoo requested review from cduck, vtomole and a team as code owners March 17, 2021 19:30
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Mar 17, 2021
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for keeping our types tidy!

@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Mar 17, 2021
@maffoo maffoo merged commit aa6ec84 into master Mar 17, 2021
@maffoo maffoo deleted the u/maffoo/resolved-types branch March 17, 2021 20:59
CirqBot pushed a commit that referenced this pull request Mar 18, 2021
Follow-up to #3922. Clean up `_resolve_parameters_` method signatures by adding types where appropriate and using consistent argument names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells CirqBot to sync and merge this PR. (If it's running.) cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stronger typing for cirq.resolve_parameters
2 participants