A CLI tool to resolve function,class codes and integrate them to single file.
This program depends on ast.unparse()
(added in python3.9
).
pip install singlue
singlue main.py > output.py
singlue
generates output.py
from main.py
,library.py
.
from library import one, two, Three
assert one() + two() == Three().three()
def one() -> int:
return 1
def two() -> int:
return 2
class Three:
def __init__(self):
self.value = 3
def three(self):
return self.value
def one() -> int:
return 1
def two() -> int:
return 2
class Three:
def __init__(self):
self.value = 3
def three(self):
return self.value
assert one() + two() == Three().three()