Skip to content

Commit 7011459

Browse files
authored
linkcheck: Use old-style string formatting to fix gettext (#12560)
1 parent aa6dac8 commit 7011459

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx/builders/linkcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def _check_uri(self, uri: str, hyperlink: Hyperlink) -> tuple[str, str, int]:
473473
) as response:
474474
if (self.check_anchors and response.ok and anchor
475475
and not contains_anchor(response, anchor)):
476-
raise Exception(__(f'Anchor {quote(anchor)!r} not found'))
476+
raise Exception(__("Anchor '%s' not found") % quote(anchor))
477477

478478
# Copy data we need from the (closed) response
479479
status_code = response.status_code

0 commit comments

Comments
 (0)