-
Notifications
You must be signed in to change notification settings - Fork 400
Fixes mypy failure with latest mypy 1.16.0 #944
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
Conversation
|
It seems to pass ok with Python 3.9, which is what I have locally and what I tested with, but in other versions of Python there is an additional failure that needs correcting. Update: for this I simply added a type ignore.
Finally I updated the ignore to cover both cases so it ignores the fact that its unused under 3.9 as well as covers the assignment type aspect for > 3.9. |
Pull Request Test Coverage Report for Build 15329190616Details
💛 - Coveralls |
* Fix errors raised by latest mypy (1.16.0) * fix comment * Added type ignore to avoid mypy failure * Fix date that somehow I messed up * Make ignore cover the 3.9 and > 3.9 cases * Fix lint too long line (why was black ok with it?) (cherry picked from commit 40fc9ab)
* Fix errors raised by latest mypy (1.16.0) * fix comment * Added type ignore to avoid mypy failure * Fix date that somehow I messed up * Make ignore cover the 3.9 and > 3.9 cases * Fix lint too long line (why was black ok with it?) (cherry picked from commit 40fc9ab) Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Summary
Fixes for latest mypy errors in CI
Details and comments
Was erroring as follows
The last one above, in
quantum_kernel_trainerI fixed it by correcting the type of a field it was accessing when creating the result where the field in question is part of the results parent classVariationalResultinvariational_algorithm. Theoptimal_valuehad a type mismatch between the getter and the setter.