refactoring: renamed few functions
This commit is contained in:
+11
-1
@@ -8,6 +8,16 @@ import common as doc
|
|||||||
from doc_state import *
|
from doc_state import *
|
||||||
|
|
||||||
|
|
||||||
|
def __doc_app_state__(state, tab=" │ "):
|
||||||
|
res = ""
|
||||||
|
if "+Threads" in state:
|
||||||
|
for i, tname in enumerate(state["+Threads"]):
|
||||||
|
if tname[0] == "+":
|
||||||
|
ch = "├─●" if i < len(state["+Threads"]) - 1 else "╰─●"
|
||||||
|
res += f"{tab} {ch} {tname[1:]}\n"
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
def __doc_application__(label, app):
|
def __doc_application__(label, app):
|
||||||
mdapp = f'\n## Real-time application "{label[1:]}"\n\n'
|
mdapp = f'\n## Real-time application "{label[1:]}"\n\n'
|
||||||
mdapp += f"Below are descrbed the states and threads of the real-time application {label[1:]}.\n"
|
mdapp += f"Below are descrbed the states and threads of the real-time application {label[1:]}.\n"
|
||||||
@@ -21,7 +31,7 @@ def __doc_application__(label, app):
|
|||||||
tab = " │ " if i < len(states) - 1 else " "
|
tab = " │ " if i < len(states) - 1 else " "
|
||||||
if label[0] == "+":
|
if label[0] == "+":
|
||||||
mdapp += f" {ch} {label[1:]}\n"
|
mdapp += f" {ch} {label[1:]}\n"
|
||||||
mdapp += doc_app_state(obj, tab)
|
mdapp += __doc_app_state__(obj, tab)
|
||||||
mdapp += "```\n"
|
mdapp += "```\n"
|
||||||
for label, obj in states.items():
|
for label, obj in states.items():
|
||||||
if label[0] == "+":
|
if label[0] == "+":
|
||||||
|
|||||||
Reference in New Issue
Block a user