Duplicate module silently replaces existing module in dmypy recheck --update
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
If one has these two files:
# [file a/mod.py]
# empty
# [file b/mod.py]
42 + 'no'
and there are no __init__.py[i] files in the directories, then running dmypy produces the following result:
$ dmypy start -- --follow-import=skip
Daemon started
$ dmypy check a/mod.py
$ dmypy recheck --update b/mod.py
b/mod.py:1: error: Unsupported operand types for + ("int" and "str")
$ dmypy recheck --remove b/mod.py
b/mod.py:1: error: Unsupported operand types for + ("int" and "str")
$ dmypy recheck --update a/mod.py
b/mod.py:1: error: Unsupported operand types for + ("int" and "str")
The problem here is twofold:
- When we first trying to add the duplicate module, this should cause a blocking error, as in normal/incremental run instead of silently replacing the other module.
- Even after one tries to remove the problematic module, it stays in build causing errors in all subsequent runs independently of what is done (except just stopping the daemon).
This is high priority because it causes troubles when adding files in existing large codebases.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere die Abfolge mit dmypy start, check, recheck --update, recheck --remove und recheck --update unter Verwendung der beiden duplizierten mod.py-Dateien. Verfolge, wie der Daemon doppelte Module während der Aktualisierung und Entfernung behandelt. Als erledigt gilt dies, wenn das Hinzufügen des Duplikats einen blockierenden Fehler meldet, das Entfernen das veraltete Modul beseitigt und spätere Überprüfungen dessen Fehler nicht mehr melden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100