New semantic analyzer: Namespace package with __init__.py breaks analysis
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
I'm getting a lot of errors reported that are not errors.
- Classes are reported as invalid types
- Calls to methods are reported as modules not having those attributes
- Instances of classes are reported as modules not callable
- Types passed to, e.g.,
isinstanceare reported asincompatible type Module(suggests that all custom types are treated as type Module) - Base classes are reported as invalid base classes
- Calls to instances of classes are reported as not having the specified attributes
- Package imports in
__init__.pyare reported as already defined
I am not sure whether these are issues are caused by the new semantic analyzer or by the Mypy plugin for PyCharm which has not been updated yet.
In comparison, with the new semantic analyzer disabled, there are no errors. The application works correctly.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
L'issue non nomina file né test. Inizia riproducendo i falsi positivi segnalati con un pacchetto namespace contenente init.py, confrontando il nuovo analizzatore semantico con l'analizzatore disabilitato e considerando la distinzione del plugin PyCharm. Il lavoro è completato quando gli errori elencati relativi a classe, metodo, istanza, ereditarietà e importazione di pacchetti non vengono più segnalati per la riproduzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100