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.
Steps
Description
This PR reverts #884. The goal of this PR was to ensure that
numpy
ufunc functions where inferred unconditionally as ufunc objects (i.e Uninferable was not part of the inferred values).However doing this led to false positives such as #895 and #899. The modules used in those bug reports do not have anything to do with
astroid
brain. They use the classical astroid engine (when i say classical it means no use of brains).IMHO it is not acceptable that trying to improve
numpy
inference (which already uses astroid brains) leds to downgrading inference of other modules. That's why i propose this PR.In case
numpy
inference really has to be improved, i'll try to find another solution.Type of Changes
Related Issue
Closes #895 #899