File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 66from sphinx_gallery .sorting import ExplicitOrder
77
88# Gallery sections shall be displayed in the following order.
9- # Non-matching sections are appended.
9+ # Non-matching sections are inserted at UNSORTED
1010explicit_order_folders = [
1111 '../examples/lines_bars_and_markers' ,
1212 '../examples/images_contours_and_fields' ,
2929 '../plot_types/stats' ,
3030 '../plot_types/unstructured' ,
3131 '../plot_types/3D' ,
32+ 'UNSORTED' ,
33+ '../examples/userdemo' ,
34+ '../tutorials/provisional' ,
3235 ]
3336
3437
@@ -37,11 +40,9 @@ class MplExplicitOrder(ExplicitOrder):
3740 def __call__ (self, item ):
3841 """Return a string determining the sort order."""
3942 if item in self .ordered_list :
40- return "{:04d}" . format ( self .ordered_list .index (item ))
43+ return f" { self .ordered_list .index (item ):04d } "
4144 else :
42- # ensure not explicitly listed items come last.
43- return "zzz" + item
44-
45+ return f"{ self .ordered_list .index ('UNSORTED' ):04d} { item } "
4546
4647# Subsection order:
4748# Subsections are ordered by filename, unless they appear in the following
You can’t perform that action at this time.
0 commit comments