dry-python / dry-python/returns
Unit method like `IOResultE.from_value` must return `IOResult[_V, Exception]` type
Đang mở
bug
help wanted
- Ngôn ngữ chính
- Python
- Star
- 4.4k
- Fork
- 155
- Merge trung bình
- 2 giờ 27 phút
- Pull request đã merge (30 ngày)
- 22
Mô tả
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?
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.