[good-first-issue] examples: convert disagg_prefill logging to %-format
Follow-up for #5118 after #5125.
#5125 enabled Ruff G004 repo-wide and added temporary per-file-ignores for the files/directories that still build logging messages with f-strings. This issue is one small slice of that cleanup queue.
Claiming: please comment /claim and wait for assignment so we avoid duplicate PRs.
Scope
Convert only the logging f-strings in:
examples/disagg_prefill/disagg_proxy_server.py(1 G004 findings)
Counts above were measured on dev at dd5dfca with ruff check --isolated --select G004.
Note: This uses a directory-level ignore because every file below that directory was unmigrated in #5125.
Expected change
- Replace logging f-strings with lazy
%-style logging arguments, for examplelogger.info("loaded %s tokens", num_tokens). - Preserve the rendered log text and behavior.
- Do not change non-logging f-strings or unrelated control flow.
- Remove the matching
G004ignore entry/entries frompyproject.tomlonce the listed paths are clean.
Matching ignore entry/entries:
"examples/disagg_prefill/**" = ["G004"]
For a ** directory ignore, delete the directory entry only when the whole listed directory is clean. If a merge conflict leaves other unmigrated files in that ignored directory, replace the broad ** entry with explicit file-level entries for the leftovers.
Verification
ruff check --isolated --select G004 examples/disagg_prefill/disagg_proxy_server.py
ruff check --select G004 examples/disagg_prefill/disagg_proxy_server.py pyproject.toml
pre-commit run --all-filesThe first command should report zero findings after the cleanup. The second command verifies the repo config still passes after removing the ignore entry/entries.
Refs #5118 Refs #3372 Refs #5125
Source: LMCache/LMCache