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

validate_country prints "Validating country" on every request

Đang mở
#3,909 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

@anth-volk đang làm issue này rồi.

Từ ngày 13/10/2026.

  • #3915 của @anth-volk — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

The stray output is the print("Validating country") call in policyengine_api/utils/payload_validators/validate_country.py, which runs before the country check in the decorator. Remove the call or swap it for a module-level logger.debug, following the logging setup the rest of the API uses. Pull request #3915 is already open against this issue, so check it before starting; this issue is not a good first pick unless that pull request is abandoned.

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

Mô tả

The validate_country decorator (policyengine_api/utils/payload_validators/validate_country.py) calls print("Validating country") before checking the country, so every request to a route it wraps writes that line to stdout.

It is debugging output: it carries no request context, bypasses the logging configuration, and adds noise to the service logs.

Expected

Remove the print, or replace it with a logger.debug call if the trace is still useful.

Notes

  • Found while documenting the code for the ruff docstring rules; left unchanged there.
  • Ruff's T20 family, planned for a later lint group, will flag this and any other print calls.
Ngôn ngữ chính
Python
Star
18
Fork
33
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
18

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 PolicyEngine/policyengine-api

Tất cả issue của PolicyEngine/policyengine-api

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.