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

Bug astroid 895 899 #901

Merged
merged 5 commits into from
Feb 21, 2021
Merged

Conversation

hippo91
Copy link
Contributor

@hippo91 hippo91 commented Feb 17, 2021

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

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

Type
🐛 Bug fix

Related Issue

Closes #895 #899

…the number of times the node has been visited. The push method return True depending on a condition of the number of visits."

This reverts commit cc3bfc5.
…ly as array and not [array, Uninferable] because it could lead to false negatives."

This reverts commit 4fc45c5.
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected error from pylint after upgrade to astroid 2.5.
2 participants