pylint-dev / pylint-dev/astroid
[2.0 bugs] Adding nodes to the end of module bodies doesn't work with the new locals handling
- Dominant language
- Python
- Stars
- 582
- Forks
- 357
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
Originally reported by: **BitBucket: [ceridwenv](http://bitbucket.org/ceridwenv), GitHub: @ceridwen**
---
I'm currently getting this test failure:
``` python
ERROR: test_numpy (unittest_brain.NumpyBrainTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "~/code/astroid/.tox/py27/lib/python2.7/site-packages/astroid/tests/unittest_brain.py", line 464, in test_numpy
inferred = next(node.infer())
File "astroid/decorators.py", line 100, in wrapped
res = next(generator)
File "astroid/decorators.py", line 158, in raise_if_nothing_inferred
raise exceptions.InferenceError(**error.args[0])
InferenceError: Inference failed for .
```
---
- Bitbucket: https://bitbucket.org/logilab/astroid/issue/259
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with astroid/decorators.py and the test_numpy case in astroid/tests/unittest_brain.py; reproduce the Python 2.7 inference failure shown for Attribute.ones. Trace how nodes appended to module bodies interact with the new locals handling, and consider the issue complete when that test infers successfully without the reported InferenceError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100