python / python/mypy

Move code to handle Tuple and TypedDict `__getitem__` to plugins

Open
#6,138 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.