Scheduler first commit
This commit is contained in:
parent
70c53a9aef
commit
2c64ebda67
24 changed files with 880 additions and 0 deletions
10
examples/schedule/schedule_lib/funcs.py
Normal file
10
examples/schedule/schedule_lib/funcs.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from typing import Callable
|
||||
|
||||
def generate_dot_wrap(func) -> Callable:
|
||||
def wrapper(self, *args, **kwargs) -> str:
|
||||
nodes = []
|
||||
edges = []
|
||||
self.reset_visited()
|
||||
func(self, nodes, edges, *args, **kwargs)
|
||||
return f"digraph G {{\n\t{"\n\t".join(nodes)}\n\t{"\n\t".join(edges)}\n}}"
|
||||
return wrapper
|
||||
Loading…
Add table
Add a link
Reference in a new issue