Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

validate_country prints "Validating country" on every request

未关闭
#3,909 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@anth-volk 已经在做这个了。

开始于 2026年10月13日。

  • #3915 来自 @anth-volk —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
python
领域
backend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Python
星标
18
派生
33
平均合并
1 天 15 小时
30 天内合并 PR
18

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。