Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit cf5406a

Browse files
committed
docs: added docstrings in main entrypoint
1 parent d76bc8a commit cf5406a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

projects/computer-algebra/main.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66
def selection_cb(sender, app_data, user_data):
7+
"""Callback function for button selections in the message box."""
78
if user_data[1]:
89
print("User selected 'Ok'")
910
else:
@@ -14,7 +15,12 @@ def selection_cb(sender, app_data, user_data):
1415

1516

1617
def show_info(title, message, selection_callback):
17-
# Reference: https://github.com/hoffstadt/DearPyGui/discussions/1002
18+
"""
19+
Display an information message box with title, message, and callback.
20+
21+
References:
22+
https://github.com/hoffstadt/DearPyGui/discussions/1002
23+
"""
1824

1925
# guarantee these commands happen in the same frame
2026
with dpg.mutex():
@@ -36,6 +42,7 @@ def show_info(title, message, selection_callback):
3642

3743
# Callbacks and Helpers
3844
def on_evaluate(sender, app_data, user_data):
45+
"""Callback function for the 'Evaluate' button."""
3946
# Get the Command
4047
cmd = dpg.get_value('radio-cmds')
4148
cmd_func = NEWTON_CMDS_DICT[cmd]

0 commit comments

Comments
 (0)