How important is the `@_dispatchable` decorator in networkx?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 5.1k
- Fork
- 2.1k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 82
Mô tả
Can this decorator be removed?
One obvious advantage for having it is to mirror runtime. It has some disadvantages though:
- I can't for the life of me find a way to use it on overloaded functions. Indeed looking at the stubs, overloaded functions are stripped of this decorator
- VS Code with Pylance does not show the documentation of the function on hover only when the decorator is used
I find the overload case very important that it outweighs the benefits of matching runtime. I also think the editor hover issue compelling on its own but one could argue that this should be discussed with the Pylance team instead.
I wonder if we could just get rid of the decorator altogether. Am I missing other reasons for having the decorator?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách truy vết các cách sử dụng decorator @_dispatchable trong typeshed và so sánh chúng với các hàm được overload trong các stub. Điều tra lý do cho việc phản chiếu runtime và hành vi hover của Pylance đã được báo cáo. Công việc được xem là hoàn tất khi đã đưa ra quyết định về việc có nên giữ lại decorator hay không, đồng thời ghi lại hoặc triển khai quyết định đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- developer-experience
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100