14 lines
296 B
Python
14 lines
296 B
Python
import astor
|
|
import inspect
|
|
from . import flags
|
|
|
|
def sign(line: str):
|
|
if flags.DEBUG:
|
|
debug_msg = inspect.currentframe().f_back.f_code.co_name
|
|
return f"{line} --- {debug_msg}"
|
|
else:
|
|
return line
|
|
|
|
def to_source(node):
|
|
return astor.to_source(node).rstrip("\n")
|