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 mypy errors (extensions) #8253

Closed
wants to merge 1 commit into from
Closed

Fix mypy errors (extensions) #8253

wants to merge 1 commit into from

Conversation

Randl
Copy link
Contributor

@Randl Randl commented Jun 28, 2022

Summary

Following discussion, I'm splitting #8187 by module.

Details and comments

This fixes all the mypy errors in extensions as for now. Since the assignment to undefined attribute is the purpose of this code, I don't see better solution than just ignore those errors

@Randl Randl requested a review from a team as a code owner June 28, 2022 13:39
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@Randl Randl mentioned this pull request Jun 28, 2022
@HuangJunye HuangJunye added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jun 28, 2022
@1ucian0 1ucian0 added the mypy Work related to support improving type hints in Qiskti code label Mar 30, 2023
Copy link
Contributor

@AngeloDanducci AngeloDanducci left a comment

Choose a reason for hiding this comment

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

Took a look at this with mypy version 1.2.0 and I didn't see the corresponding errors on main, or on the commit prior to this one.

If you can reproduce them on 1.2.0 this seems like good low hanging fruit, but both without options and with the options I found in the discussion earlier (--ignore-missing-imports --no-strict-optional --allow-untyped-globals --allow-redefinition --show-error-codes) I couldn't see the errors this would fix.

@Randl
Copy link
Contributor Author

Randl commented May 8, 2023

I do get these with

dmypy run -- --ignore-missing-imports --no-strict-optional --allow-untyped-globals --allow-redefinition --show-error-codes qiskit

Though there was some discussion with @Cryoris @kevinsung regarding not including ignores as for now. In this case we should just close this one for now

@kevinsung kevinsung closed this May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community PR PRs from contributors that are not 'members' of the Qiskit repo mypy Work related to support improving type hints in Qiskti code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants