style: convert remaining logger %-style calls to f-strings#23
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()callsThe 29 remaining
.format()calls all format Indonesian template constants fromconstants.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
grepconfirms zero remaininglogger.%("..."%...)patterns insrc/bot/