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

Bump pylint version used to latest release #12320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtreinish
Copy link
Member

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

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.
@mtreinish mtreinish added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in changelog labels May 1, 2024
@mtreinish mtreinish requested review from nonhermitian and a team as code owners May 1, 2024 13:53
@qiskit-bot
Copy link
Collaborator

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

Comment on lines 79 to 82
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
Copy link
Member

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.

Comment on lines +34 to 35
# pylint: disable=invalid-name
_CircuitsT = Union[List[QuantumCircuit], QuantumCircuit]
Copy link
Member

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])

Copy link
Member Author

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.

Copy link
Member

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

@mtreinish mtreinish added the on hold Can not fix yet label May 1, 2024
@mtreinish
Copy link
Member Author

Marking as on hold until after 1.1.0rc1 so we don't disrupt pending PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog on hold Can not fix yet type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants