Quoted type name not actually valid as base class

Aperta
#1,685 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
compilers

Direzione di ricerca

Start by reproducing the two-class example from the issue and trace the type-checking entry point that accepts the quoted base class. Compare the accepted result with Python's runtime behavior, then add a regression test showing that the invalid base class is rejected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug priority-2-low

Mypy accepts the following program, but it's actually an error at runtime (even if the lines are reversed).

class A('B'): pass
class B: pass

Sort of similar to #686, but this bug probably has a simple local fix.

Lingua principale
Python
Stelle
20.6k
Fork
3.3k
Merge medio
1g 18h
PR unite (30g)
54

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/mypy

Tutte le issue di python/mypy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.