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
Bump pylint version used to latest release #12320
base: main
Are you sure you want to change the base?
Conversation
The pinned version of pylint we're running in CI right now doesn't support Python 3.12. This is an issue if you're developing with Python 3.12 because you couldn't run pylint. This commit bumps to the latest version as of this commit and fixes the additional checks flagged by the newer version.
One or more of the the following people are requested to review this:
|
for _ in range(max_iteration): | ||
for task in self.tasks: | ||
state = yield task | ||
yield from self.tasks | ||
if not self.do_while(state.property_set): | ||
return |
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.
This is a logic change because the updated state
isn't received back from generator.send
any more. It might happen to work if the state is only mutated in place, but in general it's not a valid transformation.
# pylint: disable=invalid-name | ||
_CircuitsT = Union[List[QuantumCircuit], QuantumCircuit] |
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.
I don't actually think this is a false positive, I think it's indicative of the typing construct being wrong. This defines an alias, but the way it's used is actually intended as a typevar generic like:
from typing import TypeVar, Union, List
_CircuitsT = TypeVar("_CircuitsT", bound=Union[List[QuantumCircuit], QuantumCircuit])
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.
Well it was complaining about the name, not the type. You had to infer the name didn't match the rules for type aliases and figure out it's because it wasn't using the right thing here. But yeah I'll update to use this instead.
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.
judging by my local branch that did this and half-remembered confusion, I think I went down the same rabbit hole as you a couple of months ago yeah
Marking as on hold until after 1.1.0rc1 so we don't disrupt pending PRs |
Summary
The pinned version of pylint we're running in CI right now doesn't support Python 3.12. This is an issue if you're developing with Python 3.12 because you couldn't run pylint. This commit bumps to the latest version as of this commit and fixes the additional checks flagged by the newer version.
Details and comments