Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b86993

Browse filesBrowse files
committed
Use same code style for all logging without placeholders
When logging with only a msg argument, it is a full literal message rather than a format string (as it is when there are placeholders). Thus both `...("%s", text)` and `...(text)`, where `...` is a logging method or function, are equally good code styles, provided `text` really is known to behave the same as `str(text)`. The latter style, `...(text)`, was used in all logging calls, both in the git module and in the test suite, except one. This changes the one outlier from `...("%s", text)` to `...(text)` for stylistic consistency and to avoid giving the false impression that there is something special about that call.
1 parent 5faf621 commit 4b86993
Copy full SHA for 4b86993

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎test/test_index.py

Copy file name to clipboardExpand all lines: test/test_index.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _decode(stdout):
174174
except UnicodeDecodeError:
175175
pass
176176
except LookupError as error:
177-
_logger.warning("%s", str(error)) # Message already says "Unknown encoding:".
177+
_logger.warning(str(error)) # Message already says "Unknown encoding:".
178178

179179
# Assume UTF-8. If invalid, substitute Unicode replacement characters.
180180
return stdout.decode("utf-8", errors="replace")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.