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

Add retworkx to generated module list in the .pylintrc #8867

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

mtreinish
Copy link
Member

Summary

With the recent release of retworkx 0.12.0 the package has been renamed to rustworkx. For compatibility the retworkx python namespace continues to work and instead it just redirects imports to the new name. However, pylint is unable to reason about this dynamic import redirecting which causes it to fail in CI. While in 0.23.0 we'll update the requirement to the rustworkx name in order to unblock CI for the pending 0.22.0 release this commit adds the retworkx namespace to the list of generated modules which tells pylint to try not to detect members of the module.

Details and comments

With the recent release of retworkx 0.12.0 the package has been renamed
to rustworkx. For compatibility the retworkx python namespace continues
to work and instead it just redirects imports to the new name. However,
pylint is unable to reason about this dynamic import redirecting which
causes it to fail in CI. While in 0.23.0 we'll update the requirement to
the rustworkx name in order to unblock CI for the pending 0.22.0 release
this commit adds the retworkx namespace to the list of generated modules
which tells pylint to try not to detect members of the module.
@mtreinish mtreinish added type: qa Issues and PRs that relate to testing and code quality stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: None Do not include in changelog labels Oct 10, 2022
@mtreinish mtreinish requested a review from a team as a code owner October 10, 2022 12:33
@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

@coveralls
Copy link

coveralls commented Oct 10, 2022

Pull Request Test Coverage Report for Build 3219644802

  • 5 of 5 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.759%

Totals Coverage Status
Change from base Build 3207252911: 0.0%
Covered Lines: 61900
Relevant Lines: 73031

💛 - Coveralls

The earlier config update wasn't sufficient to get pylint to ignore all
retworkx usage. This commit adds additional config entries for retworkx
to try and get pylint to exclude it more thoroughly. Additionally,
even with these global excludes on pylint there are a few places in the
code where additional manual rule disabling was needed to get pylint to
pass (further evidence for Qiskit#1179).
@mergify mergify bot merged commit 2f40849 into Qiskit:main Oct 10, 2022
mergify bot pushed a commit that referenced this pull request Oct 10, 2022
* Add retworkx to generated module list in the .pylintrc

With the recent release of retworkx 0.12.0 the package has been renamed
to rustworkx. For compatibility the retworkx python namespace continues
to work and instead it just redirects imports to the new name. However,
pylint is unable to reason about this dynamic import redirecting which
causes it to fail in CI. While in 0.23.0 we'll update the requirement to
the rustworkx name in order to unblock CI for the pending 0.22.0 release
this commit adds the retworkx namespace to the list of generated modules
which tells pylint to try not to detect members of the module.

* Expand config and add inline excludes where needed

The earlier config update wasn't sufficient to get pylint to ignore all
retworkx usage. This commit adds additional config entries for retworkx
to try and get pylint to exclude it more thoroughly. Additionally,
even with these global excludes on pylint there are a few places in the
code where additional manual rule disabling was needed to get pylint to
pass (further evidence for #1179).

(cherry picked from commit 2f40849)
@mtreinish mtreinish deleted the pylint-ginore-retworkx branch October 10, 2022 15:05
mergify bot added a commit that referenced this pull request Oct 10, 2022
* Add retworkx to generated module list in the .pylintrc

With the recent release of retworkx 0.12.0 the package has been renamed
to rustworkx. For compatibility the retworkx python namespace continues
to work and instead it just redirects imports to the new name. However,
pylint is unable to reason about this dynamic import redirecting which
causes it to fail in CI. While in 0.23.0 we'll update the requirement to
the rustworkx name in order to unblock CI for the pending 0.22.0 release
this commit adds the retworkx namespace to the list of generated modules
which tells pylint to try not to detect members of the module.

* Expand config and add inline excludes where needed

The earlier config update wasn't sufficient to get pylint to ignore all
retworkx usage. This commit adds additional config entries for retworkx
to try and get pylint to exclude it more thoroughly. Additionally,
even with these global excludes on pylint there are a few places in the
code where additional manual rule disabling was needed to get pylint to
pass (further evidence for #1179).

(cherry picked from commit 2f40849)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
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 stable backport potential The bug might be minimal and/or import enough to be port to stable 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.

4 participants