python / python/mypy

Unclear Coverage Results

Abierto
#18,926 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug pending
Lenguaje dominante
Python
Estrellas
20.6k
Forks
3.3k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Describe the bug
Coverage report with mypy is not clear and not descriptive

To Reproduce
When using mypy report or coverage on pytest the result I'm seeing is not clear

Missing 1-6 4-7 8-7 main.py

This result only shows me the lines with the problem but not what is the problem

The closest I've gotten to seeing the full issue is when using the --report in mypy or other libraries and using html

Mypy src --html-report test

When inspecting the elements I can see issues like any type not recognized or unannotated type set, but the line is usually not correct as it might be related to the definition of the var

var: Var = some_untyped_function()

var.element <---- line that failes

What can I do to make the error clearer, see exactly what failed and how to fix it if possible

Also for reference I opened the same issue in the pycoverage repository and they're saying it might be a mypy thing

https://github.com/nedbat/coveragepy/issues/1948

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza reproduciendo la salida informada con mypy y el informe de cobertura sobre el ejemplo que incluye main.py, y compárala después con la salida de --html-report. Determina si el diagnóstico señala el origen real del valor sin tipo o sin anotación; done debe significar que el informe identifica claramente el tipo problemático y la ubicación relevante.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
devtools
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.