Remove type checker-specific symbols from builtins.pyi and typing.pyi
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 5.1k
- Forks
- 2.1k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 82
Descripción
I'm working to get rid of the type checker-specific symbols that currently are in our core stubs but don't exist at runtime. I'll use this issue to track the work needed. This involves changes both to typeshed and to type checkers.
Affected names:
typing._TypedDict. Suggesting to rename to_typeshed.TypedDictFallback. (mypy and pyright)typing._promote->_typeshed._promote(mypy only)typing.AwaitableGenerator->_typeshed.AwaitableGenerator(mypy and pyright)builtins.function(mypy and pyright). Need to look more into why we can't just usetypes.FunctionType.- Working on this in mypy but it requires updating a ton of test cases
builtins.ellipsis(mypy and pyright). Should add a new name to _typeshed, similar toNoneType.
builtins.module was also mentioned in the past but it's been fixed already (mypy PR: https://github.com/python/mypy/pull/3107).
Linked issues and PRs:
- #2999
- #3556
- #3932
- python/mypy#11564
- python/mypy#8240
- https://github.com/python/mypy/issues/2765
- https://github.com/python/mypy/issues/8699
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.
Línea de trabajo
Comienza con builtins.pyi y typing.pyi y revisa después las issues enlazadas de typeshed y del type-checker para entender las sustituciones necesarias. Comprueba el comportamiento y los casos de prueba afectados de mypy y pyright, especialmente los casos de builtins.function. Se considera terminado cuando los símbolos específicos del type-checker se hayan eliminado de los stubs principales y las pruebas afectadas del type-checker pasen.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- tooling
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100