Move code to handle Tuple and TypedDict `__getitem__` to plugins
Open
@Michael0x2a is already working on this.
Since Jan 4, 2019.
needs discussion
priority-2-low
refactoring
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Currently, we handle calls to both Tuple and TypedDict's __getitem__ code inside checkexpr. We should consider turning some or all of this code into a plugin.
I think it's somewhat debatable how useful this refactor would be for Tuple's __getitem__, but it would at least make the way we handle TypedDicts more consistent: we currently handle all other TypedDict methods inside of a plugin.
Also see https://github.com/python/mypy/pull/6124#discussion_r245185240 for context.
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.
Assessment
This issue has not been assessed yet.