Add a new option for `stubtest`: `--ensure-runtime-generic`
@sobolevn ya está trabajando en esto.
Desde el 5/5/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 20.6k
- Forks
- 3.3k
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 54
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python/mypy
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug topic-configuration topic-error-reporting
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Todos los issues de python/mypy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
bancolombia/sentinel#23 ·
-
test md AbiertoCI
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100