Skip to content

Commit 2d417d0

Browse files
Update dependency black to v26 (#398)
* Update dependency black to v26 * Fix --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kai Harder <kai.harder@sap.com>
1 parent ed9cfda commit 2d417d0

File tree

3 files changed

+41
-51
lines changed

3 files changed

+41
-51
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Changelog = "https://github.com/SAP/swagger-plugin-for-sphinx/blob/main/CHANGELO
5656
dev = [
5757
"pre-commit==4.5.1",
5858
"pylint==4.0.4",
59-
"black==25.12.0",
59+
"black==26.1.0",
6060
"isort==7.0.0",
6161
"flake8==7.3.0",
6262
"flake8-tergeo==25.12.19.1",

tests/test_plugin.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ def test_full_page(sphinx_runner: SphinxRunner, tmp_path: Path) -> None:
8282
)
8383

8484
base_url = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@latest"
85-
expected = dedent(
86-
f"""<!DOCTYPE html>
85+
expected = dedent(f"""<!DOCTYPE html>
8786
<html>
8887
<head>
8988
<title>OpenAPI Specification</title>
@@ -103,15 +102,13 @@ def test_full_page(sphinx_runner: SphinxRunner, tmp_path: Path) -> None:
103102
}}
104103
</script>
105104
</body>
106-
</html>"""
107-
)
105+
</html>""")
108106

109107
assert expected == read_api_html(tmp_path)
110108

111109

112110
def test_inline(sphinx_runner: SphinxRunner, tmp_path: Path) -> None:
113-
contents = dedent(
114-
"""
111+
contents = dedent("""
115112
API
116113
===
117114
@@ -120,8 +117,7 @@ def test_inline(sphinx_runner: SphinxRunner, tmp_path: Path) -> None:
120117
121118
.. swagger-plugin:: other.yaml
122119
:id: two
123-
"""
124-
)
120+
""")
125121
sphinx_runner(directive=contents)
126122

127123
html = read_api_html(tmp_path)
@@ -139,16 +135,14 @@ def test_inline(sphinx_runner: SphinxRunner, tmp_path: Path) -> None:
139135

140136

141137
def test_swagger_options(sphinx_runner: SphinxRunner, tmp_path: Path) -> None:
142-
contents = dedent(
143-
"""
138+
contents = dedent("""
144139
API
145140
===
146141
147142
.. swagger-plugin:: openapi.yaml
148143
:swagger-options: {"deepLinking": 1}
149144
150-
"""
151-
)
145+
""")
152146
sphinx_runner(directive=contents)
153147

154148
html = read_api_html(tmp_path)
@@ -236,8 +230,7 @@ def test_custom_urls(
236230
css_uri,
237231
)
238232

239-
expected = dedent(
240-
f"""<!DOCTYPE html>
233+
expected = dedent(f"""<!DOCTYPE html>
241234
<html>
242235
<head>
243236
<title>OpenAPI Specification</title>
@@ -257,8 +250,7 @@ def test_custom_urls(
257250
}}
258251
</script>
259252
</body>
260-
</html>"""
261-
)
253+
</html>""")
262254

263255
assert expected == read_api_html(tmp_path)
264256

@@ -300,8 +292,7 @@ def test_subdirs(tmp_path: Path, builder: str) -> None:
300292
)
301293
two = subsubdir / "two.rst"
302294
two.write_text(
303-
dedent(
304-
"""
295+
dedent("""
305296
API Two
306297
=======
307298
@@ -310,8 +301,7 @@ def test_subdirs(tmp_path: Path, builder: str) -> None:
310301
311302
.. swagger-plugin:: ../../../code/openapi.yaml
312303
:id: from-code
313-
"""
314-
),
304+
"""),
315305
encoding="utf-8",
316306
)
317307

uv.lock

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)