Skip to content

Commit

Permalink
split docstrings to be <= 80 chars per line
Browse files Browse the repository at this point in the history
  • Loading branch information
jesicasusanto committed Jun 16, 2023
1 parent 09680c6 commit 8f0b179
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions openadapt/window/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def get_active_window_meta(active_window) -> dict:
active_window: The active window object.
Returns:
dict: A dictionary containing the meta information of the active window.
dict: A dictionary containing the meta information of the
active window.
"""
if not active_window:
logger.warning(f"{active_window=}")
Expand Down Expand Up @@ -103,17 +104,21 @@ def get_element_properties(element):
Recursively retrieves the properties of each element and its children.
Args:
element: An instance of a custom element class that has the `.get_properties()` and `.children()` methods.
element: An instance of a custom element class
that has the `.get_properties()` and `.children()` methods.
Returns:
A nested dictionary containing the properties of each element and its children.
The dictionary includes a "children" key for each element, which holds the properties of its children.
The dictionary includes a "children" key for each element,
which holds the properties of its children.
Example:
element = Element()
properties = get_element_properties(element)
print(properties)
# Output: {'prop1': 'value1', 'prop2': 'value2', 'children': [{'prop1': 'child_value1', 'prop2': 'child_value2', 'children': []}]}
# Output: {'prop1': 'value1', 'prop2': 'value2',
'children': [{'prop1': 'child_value1', 'prop2': 'child_value2',
'children': []}]}
"""

properties = element.get_properties()
Expand Down

0 comments on commit 8f0b179

Please sign in to comment.