Add a new option for `stubtest`: `--ensure-runtime-generic`
@sobolevn ci sta già lavorando.
Dal 5/5/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
In django-stubs we have a problem: some types that we declare generic are not generic in runtime.
We have a special package to monkeypatch runtime types to add __class_getitem__ to classes: https://github.com/typeddjango/django-stubs/blob/08cdfe576d62fc3a2dfc33197a3260cb0a0dc097/ext/django_stubs_ext/patch.py#L56
But, we cannot really catch this. We have a lot of report about some type being generic in stubs but not in runtime. And we have to add new entries to our list of patched types.
We would really love to see --ensure-runtime-generic option for stubtest which will check that types that are generic in stubs are also generic in runtime.
It should be switched off by default.
I can work on this if others are fine with the idea itself.
- 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
- 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.
Altre issue di python/mypy
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug topic-configuration topic-error-reporting
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
zostera/django-bootstrap4#894 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
use-agent-os/agent-os#3276 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·