Don't rely on reprocessing of targets with errors in fine grained mode

Offen
#4,801 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python

Rechercherichtung

Start by running the [case testWarnUnusedIgnoresFine] scenario with --warn-unused-ignores and confirm the current failure. Trace how fine-grained mode handles targets with errors and reprocessing, then determine how dependency tracking or cached errors should make the case pass without relying on reprocessing.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

needs discussion topic-fine-grained-incremental

Consider this test case:

[case testWarnUnusedIgnoresFine]
# flags: --warn-unused-ignores
import a
[file a.py]
import b
b.x  # type: ignore
[file b.py]
# empty
[file b.py.2]
x = 1
[out]
==
a.py:2: note: unused 'type: ignore' comment

Currently it fails, presumably because we don't reprocess a.py. This however points to a larger potential problem, currently we are relying on reprocessing targets with errors. However, a better idea might be to only rely on fine grained dependencies. Of course, we can cache errors and just show them if a target had errors and was not reprocessed.

Vorherrschende Sprache
Python
Sterne
20.6k
Forks
3.3k
Ø Merge
1 T. 18 Std.
Gemergte PRs (30 T.)
54

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python/mypy

Alle Issues in python/mypy

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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