Reimplement NamedTuple support in preparation for upcoming stub changes
- Dominant language
- Python
- Stars
- 15.6k
- Forks
- 1.8k
- Avg merge
- 12h 13m
- Merged PRs (30d)
- 52
Description
Pyright currently models `NamedTuple` classes as subclasses of `tuple`. In other words, it adds a `NamedTuple` class to the mro list. This implementation is based on the current definition of `typing.NamedTuple`, which is modeled as a class. The maintainers of typeshed are proposing to change `NamedTuple` to be a function or a special form to more closely model the runtime behavior. This change will require pyright to make corresponding modifications. Some of these modifications can be done prior to the typeshed changes.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating Pyright's current NamedTuple class and MRO modeling, then review the proposed typeshed changes; done means NamedTuple behavior remains correctly modeled after those definitions change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100