dry-python / dry-python/returns
Unit method like `IOResultE.from_value` must return `IOResult[_V, Exception]` type
Offen
bug
help wanted
- Vorherrschende Sprache
- Python
- Sterne
- 4.4k
- Forks
- 155
- Ø Merge
- 2 Std. 27 Min.
- Gemergte PRs (30 T.)
- 22
Beschreibung
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?
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.