Skip to content

Commit cad9522

Browse files
committed
Pass values as arguments to the logging method to defer string formatting until required
1 parent bb4684d commit cad9522

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build_docs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ def from_json(cls, data: dict) -> Versions:
112112
status = Version.SYNONYMS.get(status, status)
113113
if status not in Version.STATUSES:
114114
logging.warning(
115-
f"Saw invalid version status {status!r}, "
116-
f"expected to be one of {permitted}. Context: {release}"
115+
"Saw invalid version status %r, expected to be one of %s. Context: %s",
116+
status,
117+
permitted,
118+
release,
117119
)
118120
continue
119121
versions.append(Version(name=name, status=status, branch_or_tag=branch))

0 commit comments

Comments
 (0)