Modernize TypeVar syntax to PEP 695

Đang mở
#1,158 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start with src/art/utils/retry.py, where the issue identifies reused ParamSpec and TypeVar declarations and an orphaned TypeVar. Then search the repository for other old TypeVar syntax and unused declarations; the issue proposes reviewing more cases but does not name additional files. Done means replacing suitable declarations with PEP 695 syntax and removing dead declarations, with the affected tests passing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi :)

As part of my investigation, I came upon this repository.

There are many instances of old syntax that exists or just is orphaned.

For example:

P = ParamSpec("P")
R = TypeVar("R")
T = TypeVar("T")

src/art/utils/retry.py: "P" and "R" are reused in a few functions, while it would really benefit from PEP 695's new syntax, while T is just an orphaned TypeVar aka dead code.

I would be happy to look into more cases and prepare a PR to modernize and deal with such cases.

Ngôn ngữ chính
Python
Star
10.9k
Fork
1k
Merge trung bình
2 ngày 5 giờ
Pull request đã merge (30 ngày)
38

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenPipe/ART

Tất cả issue của OpenPipe/ART

Issue tương tự

Thêm issue về Python

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.