pylint-dev / pylint-dev/astroid
Add base classes (or mixins) for the type of nodes
- 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)**
---
We should add a couple of base classes (or mixins) in astroid for exporting the type of capabilites a node can have. For instance, Callable needs to implement `infer_call_result`, Iterable needs to implement `itered`. Sequence needs to implement `getitem` and so on. This would be extremely helpful when adding new nodes, especially when adding new objects such as objects.Super or objects.FrozenSet.
---
- Bitbucket: https://bitbucket.org/logilab/astroid/issue/133
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing astroid's existing node classes and how the Callable, Iterable, and Sequence capabilities are currently represented. Trace infer_call_result, itered, and getitem, then compare the needs of objects.Super and objects.FrozenSet; done means the capability design is agreed and supports adding these node types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100