Disable pylint's import-error#8973
Merged
Merged
Conversation
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage.
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:
|
Pull Request Test Coverage Report for Build 3299725393
💛 - Coveralls |
mtreinish
approved these changes
Oct 21, 2022
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this pull request
Jun 27, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-algorithms-test
that referenced
this pull request
Jul 17, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-algorithms
that referenced
this pull request
Jul 27, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-provider
that referenced
this pull request
Oct 4, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-runtime
that referenced
this pull request
Oct 10, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this pull request
Oct 12, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-runtime
that referenced
this pull request
Dec 8, 2023
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be _effectively_ losing coverage. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pylint rule has a tendency to be overzealous when we're dealing with optional packages that we don't require to be installed, with compiled modules, and with packages which dynamically mutate the Python path look-up. Overall, it was giving far more false positives than anything else, and a failure-to-import should be abundantly obvious from a standard test run, so we shouldn't be effectively losing coverage.
Details and comments
With the work in #8967 moving to do more testing of the no-optionals paths, and to make a cleaner split between "optional package" and "development package", the additional pain pylint is causing with its overzealous
import-errormakes it more worthwhile to remove now. Python importability cannot generally be determined statically, despite what pylint tries.