pylint-dev / pylint-dev/astroid
Metaclass evaluation
- Dominant language
- Python
- Stars
- 582
- Forks
- 357
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
Originally reported by: **Claudiu Popa (BitBucket: [PCManticore](http://bitbucket.org/PCManticore), GitHub: @PCManticore)**
---
There's a big potential of improvements regarding the metaclasses. We should definitely have some sort of evaluation, for code such as the following:
```
#!python
import six
class A(type):
def __call__(cls):
return 42
@six.add_metaclass(A)
class B(object):
pass
b = B()
print(b.f) # b is an integer
```
---
- Bitbucket: https://bitbucket.org/logilab/astroid/issue/173
Contributor guide
No contributing guide indexed for this repository
Research direction
No source files or tests are named. Start by reproducing the `six.add_metaclass` example and tracing astroid's metaclass evaluation and inference behavior; clarify the intended result and scope before implementation. Done should include a defined evaluation behavior for the example and regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100