We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This bug has been found during the setup of the numpy brains. Fixing it could improve our inference system for numpy functions.
numpy
The directory described hereafter reflects a similar structure inside the numpy sources.
bug_inf
$ tree bug_inf bug_inf ├── core │ ├── __init__.py │ └── shape_base.py ├── __init__.py └── lib ├── __init__.py └── shape_base.py
bug_inf/core/__init__.py
$ cat bug_inf/core/__init__.py from .shape_base import *
bug_inf/core/shape_base.py
$ cat bug_inf/core/shape_base.py def vstack(): return 42
bug_inf/__init__.py
$ cat bug_inf/__init__.py from .core import * from .lib import *
bug_inf/lib/__init__.py
$ cat bug_inf/lib/__init__.py from .shape_base import *
bug_inf/lib/shape_base.py
$ cat bug_inf/lib/shape_base.py from bug_inf.core import vstack
bug_inf.py
from astroid import extract_node SRC = """ from bug_inf import vstack vstack() """ NODE = extract_node(SRC) print(NODE.inferred())
python3 bug_inf.py
$ python3 bug_inf.py [<Const.int l.2 at 0x7f08471338d0>, Uninferable]
$ python3 bug_inf.py [<Const.int l.2 at 0x7f08471338d0>]
python3 -c "from astroid import __pkginfo__; print(__pkginfo__.version)" 2.3.0
The text was updated successfully, but these errors were encountered:
Here is attached an archive with the files described in the issue. bug_inf.tar.gz
Sorry, something went wrong.
Fixed thanks to PR #884
hippo91
Successfully merging a pull request may close this issue.
This bug has been found during the setup of the
numpy
brains.Fixing it could improve our inference system for
numpy
functions.The directory described hereafter reflects a similar structure inside the
numpy
sources.Steps to reproduce
bug_inf
with the following structure:bug_inf/core/__init__.py
content is:bug_inf/core/shape_base.py
content is:bug_inf/__init__.py
content is:bug_inf/lib/__init__.py
content is:bug_inf/lib/shape_base.py
content is:bug_inf.py
which content is:python3 bug_inf.py
Current behavior
Expected behavior
Astroid version
The text was updated successfully, but these errors were encountered: