Skip to content

Commit 7c68091

Browse files
jayaddisonAA-Turner
authored andcommitted
Fix lint warning: line length limit exceeded in linkcheck builder
1 parent e903872 commit 7c68091

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sphinx/builders/linkcheck.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,9 @@ def _check_uri(self, uri: str, hyperlink: Hyperlink) -> tuple[str, str, int]:
406406
_user_agent=self.user_agent,
407407
_tls_info=(self.tls_verify, self.tls_cacerts),
408408
) as response:
409-
if response.ok and self.check_anchors and anchor and not contains_anchor(response, anchor):
410-
raise Exception(__(f'Anchor {anchor!r} not found'))
409+
if response.ok and self.check_anchors:
410+
if anchor and not contains_anchor(response, anchor):
411+
raise Exception(__(f'Anchor {anchor!r} not found'))
411412

412413
# Copy data we need from the (closed) response
413414
status_code = response.status_code

0 commit comments

Comments
 (0)