Preserve sequence length with ambiguous elements - #3221
Open
Boulea7 wants to merge 1 commit into
Open
Conversation
Collaborator
|
Can you rebase this and use |
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3221 +/- ##
==========================================
- Coverage 93.65% 93.65% -0.01%
==========================================
Files 93 93
Lines 11583 11581 -2
==========================================
- Hits 10848 10846 -2
Misses 735 735
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Type of Changes
Description
Tuple and list concatenation expanded an element with multiple inferred values into multiple sequence items. This produced the wrong sequence length and caused downstream false positives when unpacking.
Each source element now contributes exactly one result. A unique inferred value stays precise, while an ambiguous or uninferable value becomes an unknown element.
Closes pylint-dev/pylint#2621
Verification
The complete pre-commit command could not initialize its copyright hook because git fetch could not connect to github.com on port 443. The corresponding local checks above passed.