Skip to content

Commit

Permalink
Updated docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
CWestICL committed Oct 6, 2023
1 parent 8e143ad commit 67b17c9
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions app/pages/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,29 @@


def get_default(space: str) -> str:
"""Function to get default option for dropdown."""
"""Function to get default option for dropdown.
Args:
space: Name of the space
Returns:
The default section of the space
"""
for section in core.INIT_SECTIONS:
if section["space"] == space:
default: str = str(section["name"])
return default


def get_dropdown(space: str) -> html.Div:
"""Function to generate dropdown menus."""
"""Function to generate dropdown menus.
Args:
space: Name of the space
Returns:
Div containing dropdown menu
"""
div = html.Div(
style={"width": "46%"},
children=[
Expand All @@ -45,7 +59,14 @@ def get_dropdown(space: str) -> html.Div:


def get_pc_dropdown(pc: str) -> html.Div:
"""Function to generate dropdown menu group for PC displays."""
"""Function to generate dropdown menu group for PC displays.
Args:
pc: Name of the PC with a Top, Left and Right space
Returns:
Div containing multiple dropdown menus
"""
div = html.Div(
style={"width": "46%"},
children=[
Expand Down Expand Up @@ -83,7 +104,15 @@ def get_pc_dropdown(pc: str) -> html.Div:


def get_button(func: str, icon: str) -> html.Button:
"""Function to generate buttons."""
"""Function to generate buttons.
Args:
func: Name of the button function
icon: Path of the DashIconify icon
Returns:
Button element with desired id
"""
button = html.Button(
id=f"button_{func}",
style={
Expand Down

0 comments on commit 67b17c9

Please sign in to comment.