Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

unregister() argument validation relies on assert

Đang mở
#762 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

@ekanshul đang làm issue này rồi.

Từ ngày 9/10/2026.

  • #772 của @ekanshul — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
devtools

Hướng nghiên cứu

The checks live in the unregister() method, which the issue names but does not locate in a file, so search the repository for it. Confirm that assert is what enforces the two conditions, then run the existing unregister tests to see what currently passes. Done means both error cases raise the proposed exceptions, but the maintainers have not yet agreed to the AssertionError breaking change, so check for a decision before writing code.

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

Mô tả

🤖 Written by Claude Opus 5.5 via Claude Code for the pluggy maintainers; I prompted it, it did the work, I read it.

unregister() checks "one of name or plugin" and "plugin is not registered" with assert. Under python -O, pm.unregister(unregistered_plugin) silently returns the plugin, and pm.unregister() returns None.

Proposal: raise TypeError when neither argument is given, and ValueError when the plugin is not registered. Code that currently catches AssertionError would need to change.

Found while working on #759.

Ngôn ngữ chính
Python
Star
1.7k
Fork
172
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
21

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 pytest-dev/pluggy

Tất cả issue của pytest-dev/pluggy

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.