dry-python / dry-python/returns

Unit method like `IOResultE.from_value` must return `IOResult[_V, Exception]` type

Abierto
#407 9 comentarios 0 reacciones 0 asignados Ver en GitHub
bug help wanted
Lenguaje dominante
Python
Estrellas
4.4k
Forks
155
Merge medio
2 h 27 min
PR fusionados (30 d)
22

Descripción

Currently, they do return incorrect types:

```python
reveal_type(IOResultE.from_value(int))
# => IOResult[int, Any]

# Should be:
# => IOResult[int, Exception]
```

To achieve what we want we might tweak the way we create an alias in some way:
1. We can use inheritance instead of aliasing
2. We can use some magic
3. mypy plugin?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.