Skip to content

Commit

Permalink
pycodestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindougherty-noaa committed Jun 26, 2024
1 parent 0b01df6 commit 17cc991
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/sphinxext/gallery_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
explicit_order_folders.extend([fd for folders in folder_lists
for fd in folders[folders.index(UNSORTED):]])


class MplExplicitOrder(ExplicitOrder):
"""For use within the 'subsection_order' key."""
def __call__(self, item):
Expand All @@ -41,6 +42,7 @@ def __call__(self, item):
else:
return f"{self.ordered_list.index(UNSORTED):04d}{item}"


# Subsection order:
# Subsections are ordered by filename, unless they appear in the following
# lists in which case the list order determines the order within the section.
Expand All @@ -62,9 +64,10 @@ def __call__(self, item):
# **Plot Types**
# Basic
"line"
]
]
explicit_subsection_order = [item + ".py" for item in list_all]


class MplExplicitSubOrder(ExplicitOrder):
"""For use within the 'within_subsection_order' key."""
def __init__(self, src_dir):
Expand All @@ -79,6 +82,7 @@ def __call__(self, item):
# ensure not explicitly listed items come last.
return "zzz" + item


# Provide the above classes for use in conf.py
sectionorder = MplExplicitOrder(explicit_order_folders)
subsectionorder = MplExplicitSubOrder

0 comments on commit 17cc991

Please sign in to comment.