Skip to content

Commit 56d6a63

Browse files
committed
ruff check fix
1 parent d115b1e commit 56d6a63

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sphinx/builders/linkcheck.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ def handle_starttag(self, tag: Any, attrs: Any) -> None:
736736
self.found = True
737737
break
738738

739+
739740
def _allowed_redirect(
740741
url: str, new_url: str, allowed_redirects: dict[re.Pattern[str], re.Pattern[str]]
741742
) -> bool:

tests/test_builders/test_build_linkcheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,13 +1565,13 @@ def mock_request(self, method, url, **kwargs):
15651565
# Should be working because case is ignored
15661566
assert rowsby[lowercase_uri]['status'] == 'working'
15671567

1568+
15681569
@pytest.mark.sphinx(
15691570
'linkcheck',
15701571
testroot='linkcheck-localserver-anchor',
15711572
freshenv=True,
15721573
confoverrides={'linkcheck_ignore_case': True},
15731574
)
1574-
15751575
def test_linkcheck_anchors_remain_case_sensitive(app: SphinxTestApp) -> None:
15761576
"""Test that anchors remain case-sensitive even with linkcheck_ignore_case=True."""
15771577
with serve_application(app, CaseSensitiveHandler) as address:
@@ -1585,7 +1585,7 @@ def test_linkcheck_anchors_remain_case_sensitive(app: SphinxTestApp) -> None:
15851585

15861586
content = (app.outdir / 'output.json').read_text(encoding='utf8')
15871587
rows = [json.loads(x) for x in content.splitlines()]
1588-
1588+
15891589
# The HTML has "MyAnchor" but we request "myanchor"
15901590
# Even with linkcheck_ignore_case=True, anchors should be case-sensitive
15911591
# so this should be broken

0 commit comments

Comments
 (0)