Skip to content

Commit

Permalink
Add docstring to add_final_subsection_to_step_3 function
Browse files Browse the repository at this point in the history
  • Loading branch information
pcraig3 committed Dec 10, 2024
1 parent cafc98d commit 75812d9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bloom_nofos/nofos/nofo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,24 @@ def decompose_instructions_tables(soup):


def add_final_subsection_to_step_3(sections):
"""
This function looks for a section named either "Step 3: Prepare Your Application"
or "Step 3: Write Your Application" (case-insensitive). If found, it adds a
new subsection as the last subsection in the section's "subsections" list.
Args:
sections (list of dict): A list of section dictionaries, where each section may
contain a "name" (str) and a "subsections" (list of dict) key.
Side Effects:
- Modifies the `sections` list in-place by adding a new subsection to the
matching "Step 3" section.
Note:
This function stops searching after finding and modifying the first matching
"Step 3" section.
"""

# The target section names to search for
step_3_names = [
"Step 3: Prepare Your Application",
Expand Down

0 comments on commit 75812d9

Please sign in to comment.