dry-python / dry-python/returns
Unit method like `IOResultE.from_value` must return `IOResult[_V, Exception]` type
Ouverte
bug
help wanted
- Langage dominant
- Python
- Étoiles
- 4.4k
- Forks
- 155
- Merge moyen
- 2 h 27 min
- PR mergées (30 j)
- 22
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.