Skip to content

Commit 3fe9927

Browse files
committed
black
1 parent 428a5a8 commit 3fe9927

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

examples/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
]
4646

4747

48-
4948
def remove_index(app):
5049
"""
5150
This removes the index pages so rediraffe generates the redirect placeholder

sphinxext/thumbnail_extractor.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"howto": "How to",
109109
}
110110

111+
111112
def create_thumbnail(infile, width=275, height=275, cx=0.5, cy=0.5, border=4):
112113
"""Overwrites `infile` with a new file of the given size"""
113114
im = image.imread(infile)
@@ -183,20 +184,25 @@ def main(app):
183184
for folder, title in folder_title_map.items():
184185

185186
nb_paths = glob(f"{folder}/*.ipynb")
186-
file.append(SECTION_TEMPLATE.format(section_title=title, underlines="-"*len(title)))
187+
file.append(SECTION_TEMPLATE.format(section_title=title, underlines="-" * len(title)))
187188
target_dir = os.path.join("..", "_thumbnails", folder)
188189
if not os.path.isdir(target_dir):
189190
os.mkdir(target_dir)
190191

191192
for nb_path in nb_paths:
192193
nbg = NotebookGenerator(nb_path, "..", folder)
193194
nbg.gen_previews()
194-
file.append(ITEM_TEMPLATE.format(doc_reference=os.path.join(folder, nbg.stripped_name), image=nbg.png_path))
195+
file.append(
196+
ITEM_TEMPLATE.format(
197+
doc_reference=os.path.join(folder, nbg.stripped_name), image=nbg.png_path
198+
)
199+
)
195200

196201
with open("gallery.rst", "w", encoding="utf-8") as f:
197202
f.write("\n".join(file))
198203

199204
os.chdir(working_dir)
200205

206+
201207
def setup(app):
202208
app.connect("builder-inited", main)

0 commit comments

Comments
 (0)