stubgen: missing `__str__` method when the signature is different from default
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 20.6k
- Forks
- 3.3k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug Report
When generating a stub with classes that define __str__ with extra parameters, __str__ is missing from the generated stub.
(A clear and concise description of what the bug is.)
To Reproduce
stubgen -p PyInstaller.utils.win32.versioninfo
Expected Behavior
Classes in the generated PyInstaller.utils.win32.versioninfo stub should define def __str__(self, indent: str = "") -> str: ...
Actual Behavior
It's missing. Which results in a stubtest failure that has to be fixed manually.
Your Environment
- Mypy version used: mypy 1.0.0 (compiled: yes)
- Mypy command-line flags: N/A (stubgen, see above)
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: Python 3.9.13
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 reproduciendo el problema con stubgen -p PyInstaller.utils.win32.versioninfo y, a continuación, sigue el punto de entrada de stubgen que gestiona los métodos __str__. Se considera terminado cuando el stub generado incluye def __str__(self, indent: str = "") -> str: ... para las clases afectadas y evita el fallo de stubtest indicado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100