File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -520,10 +520,6 @@ def _import_nibabel(why="work with MRI data"):
520520
521521
522522# better example sorting, without relying on numbers in example titles
523- with open (Path (__file__ ).parents [1 ] / "doc" / "example_order.json" ) as fid :
524- EXAMPLE_ORDER = json .load (fid )
525-
526-
527523def _example_sorter (filename ):
528524 """Sort for MNE-BIDS example filenames in a custom order.
529525
@@ -532,6 +528,9 @@ def _example_sorter(filename):
532528 to work correctly in Sphinx Gallery / maintain serializability of the sphinx gallery
533529 config dict in `conf.py`.
534530 """
531+ with open (Path (__file__ ).parents [1 ] / "doc" / "example_order.json" ) as fid :
532+ EXAMPLE_ORDER = json .load (fid )
533+
535534 if filename not in EXAMPLE_ORDER :
536535 EXAMPLE_ORDER .append (filename )
537536 return EXAMPLE_ORDER .index (filename )
You can’t perform that action at this time.
0 commit comments