ApeWorX / ApeWorX/web3.py

Add documentation for `TypedDict` return values of methods usable by 3rd parties

Đang mở
#1,628 18 bình luận 0 reaction 0 người được giao Xem trên GitHub
Good First Issue priority: p3 nice to have
Ngôn ngữ chính
Python
Star
5.5k
Fork
1.7k
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
2

Mô tả

### What was wrong?

While making an application that uses the web3.py library I found myself really wishing there were strong return types for the various methods like `w3.eth.get_block(...)`. Basically, I want to have something like a `TypedDict` which strongly defines the return types of the various web3 methods.

### How can it be fixed?

The `web3` library should have `TypedDict` types for all of the various return types that return a mapping. These types should be importable by 3rd party libraries (probably via `web3.typing`) and should also be documented (probably in a new section of the documentation focused on how to do typing for 3rd party applications).

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.