Skip to content

Commit

Permalink
refactor: reduce repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Oct 25, 2023
1 parent cbf7ebc commit daa5775
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/create-listings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@


def main():
for dirpath in (
os.path.join("docs", "modules"),
os.path.join("docs", "subworkflows"),
):
for listing in ("modules", "subworkflows"):
dirpath = os.path.join("docs", listing)
if os.path.exists(dirpath):
shutil.rmtree(dirpath)
os.mkdir(dirpath)
write_listing_components("modules")
write_listing_components("subworkflows")
write_listing_components(listing)


def write_listing_components(mtype):
Expand Down

0 comments on commit daa5775

Please sign in to comment.