2024-04-19 13:57:21 +08:00

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")