validate_country prints "Validating country" on every request
维护者通常 1 天内回复
评估
调研方向
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
T20family, planned for a later lint group, will flag this and any otherprintcalls.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 1 天内回复
-
Enable ruff security, logging and debugging rules (S, T20, LOG, G, DTZ, ERA, TD, FIX, EXE)可能已有人在做 @anth-volk 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 18/100
PolicyEngine/policyengine-api#3914 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 38/100
PolicyEngine/policyengine-api#3912 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 48/100
PolicyEngine/policyengine-api#3908 ·
维护者通常 1 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
Agentic
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Imbad0202/academic-research-skills#979 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
reflex-dev/reflex#7561 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
prometheus-community/ansible#906 · 2 条评论 ·