Traverse also generated TypeInfos, methods and attributes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
TraverserVisitor doesn't traverse generated TypeInfos (for things like call based enums) or methods (for named tuples). Perhaps it should? A concrete effect is that some checks such as type arg compatibility checks may not be performed for generated nodes. Arguably this is fine from a correctness viewpoint, since creating an invalid type is a bug in mypy or a plugin. However, this makes it harder to ensure that generated nodes are valid.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating TraverserVisitor and inspect how it traverses generated TypeInfos, methods, and attributes, including nodes produced for call-based enums and named tuples. Determine the intended traversal behavior and add coverage showing that checks such as type argument compatibility are applied to generated nodes; done means the relevant generated nodes are traversed consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100