validate_country prints "Validating country" on every request
維護者通常 2 天內回覆
評估
研究方向
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
- 平均合併
- 2 天 7 小時
- 30 天內合併 PR
- 64
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/policyengine-api 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
維護者通常 2 天內回覆
-
難度 1/5 1-3 小時 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
維護者通常 2 天內回覆
-
Split the release tests over six runners, and stop repeating the merge run's checks on the release commit可能已有人在做 @anth-volk 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
PolicyEngine/policyengine-api#4133 ·
維護者通常 2 天內回覆
-
Serve household reports at /v2/reports可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 4/5 3-5 天 新手友好度 48/100
PolicyEngine/policyengine-api#4131 ·
維護者通常 2 天內回覆
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 79/100
aws-samples/sample-per-model-bedrock#639 ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 86/100
awslabs/visual-asset-management-system#937 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
project-codeflare/codeflare-sdk#1195 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
pandas-dev/pandas-stubs#2051 ·
維護者通常 1 天內回覆