File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,31 +137,24 @@ def render_example_index_doc(
137137def prepend_preamble (
138138 config : ExampleDocBuildConfig , ide_link : str | None , content : bytes
139139) -> bytes :
140- preamble = textwrap .dedent (
141- f"""\
140+ preamble = textwrap .dedent (f"""\
142141 ---
143142 menu_weight: { config .menu_weight }
144143 ---
145144
146- """
147- )
145+ """ )
148146
149147 if ide_link is not None :
150- preamble += textwrap .dedent (
151- f"""
148+ preamble += textwrap .dedent (f"""
152149 :flows_ide_link: { ide_link }
153150
154- """
155- )
151+ """ )
156152
157153 return preamble .encode ("utf-8" ) + content
158154
159155
160156def append_source_blocks (content : bytes ) -> bytes :
161- return (
162- content
163- + textwrap .dedent (
164- """
157+ return content + textwrap .dedent ("""
165158 == Source code
166159
167160 [.accordionize]
@@ -199,13 +192,10 @@ def append_source_blocks(content: bytes) -> bytes:
199192 ----
200193 ====
201194 --
202- """
203- ).encode ("utf-8" )
204- )
195+ """ ).encode ("utf-8" )
205196
206197
207- INDEX_TEMPLATE = jinja2 .Template (
208- """\
198+ INDEX_TEMPLATE = jinja2 .Template ("""\
209199 ---
210200menu_weight: 180
211201---
@@ -217,8 +207,7 @@ def append_source_blocks(content: bytes) -> bytes:
217207+
218208{{ item.short_description | replace("\n \n ", "\n +\n ") }}
219209{% endfor %}
220- """
221- )
210+ """ )
222211
223212
224213def build_index_doc (configs : list [ExampleDocBuildConfig ]) -> bytes :
You can’t perform that action at this time.
0 commit comments