python / python/mypy

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

Offen
#6,138 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@Michael0x2a arbeitet bereits daran.

Seit 04.1.2019.

needs discussion priority-2-low refactoring
Vorherrschende Sprache
Python
Sterne
20.6k
Forks
3.3k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.