Skip to content

style: convert remaining logger %-style calls to f-strings#23

Merged
rezhajulio merged 1 commit into
mainfrom
style/f-string-logs
Jul 6, 2026
Merged

style: convert remaining logger %-style calls to f-strings#23
rezhajulio merged 1 commit into
mainfrom
style/f-string-logs

Conversation

@rezhajulio

Copy link
Copy Markdown
Owner

Summary

Convert the last 3 logger calls still using printf-style formatting to f-strings.

Changes

  • src/bot/plugins/manager.py: 2 logger calls (Registered plugin: %s (group=%d, %d %s), Computed effective plugin map for %d group(s))
  • src/bot/plugins/config.py: 1 logger call (Plugin '%s' disabled for group %d, skipping)

Also dropped the # type: ignore[arg-type] comment on the manager.py line — it was there to silence the logger call's variadic arg typing, which no longer applies.

Why not all .format() calls

The 29 remaining .format() calls all format Indonesian template constants from constants.py. AGENTS.md mandates "no hardcoded indonesian text → use constants.py templates", so those .format() calls are an i18n boundary, not a formatting style choice. Converting them would inline Indonesian strings into handler logic and break the i18n convention.

Verification

  • 965 tests pass
  • ruff clean, mypy clean
  • grep confirms zero remaining logger.%("..."%...) patterns in src/bot/

Last 3 logger calls still using printf-style formatting; all other log
messages and inline string formatting already use f-strings. Template
constants in constants.py keep .format() since they are an i18n boundary.
@rezhajulio rezhajulio merged commit 2d66df1 into main Jul 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant