@@ -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
112110def 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
141137def 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
0 commit comments