0.800: Unable to configure subdirectories
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
In Mypy 0.800, it now checks files in subdirectories without __init__.py files.
The problem is that the config still only works on modules containing __init__.py, meaning there is no way to change the config for these subdirectories.
e.g.
untyped-def errors have started appearing in test/foo/bar.py
Adding this to config has no effect:
[mypy-tests.*]
disallow_untyped_defs = False
This only works if tests/__init__.py and tests/foo/__init__.py are created.
Expected behaviour is that the above config will ignore the errors, or an alternative syntax is available to do so (e.g. [mypy-tests/*].
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 das Problem mit tests/foo/bar.py und einer Konfiguration mit [mypy-tests.*] und disallow_untyped_defs = False. Verfolge, wie Konfigurationsabschnitte Unterverzeichnissen ohne init.py-Dateien zugeordnet werden; abgeschlossen ist die Aufgabe, wenn die bestehende Syntax funktioniert oder eine alternative Syntax unterstützt und anhand dieses Beispiels verifiziert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100