Avoid duplicate inference results for List[int]
#2185
Merged
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
Fix a regression in 3.0.0.a3 that became necessary once we fixed the cache key in 0740a0d.
If we re-run the inference function for inferring a slice like
List[int]
, we risk creating so many duplicates, especially if used in several files, that we hit the limit for max inference and end up introducing anUninferable
, which can cause some pylint checks to not fire.This explains (and resolves!) the failures seen in pylint-dev/pylint#8685 (comment), which we were only seeing when running the test suite as a whole.
Skipping news because we're not writing changelogs specific to each alpha.
This should unblock pylint-dev/pylint#8685.