def test_simple_case(): def foo(a, b: int, c=1.2): return [a, b, c] assert argser.call(foo, '1 2') == ['1', 2, 1.2] assert argser.call(foo, '2 3 -c 4.4') == ['2', 3, 4.4] def foo(a, b: List[int]): return [a, b] assert argser.call(foo, '1 2 3') == ['1', [2, 3]]
from urgent.cli import cc from argser import call call(cc)
from urgent.repl1s import repl from argser import call call(repl)
def main(): from argser import call call(comp)
from proud.pybackend import PyBackEnd from argser import call from colorama import Fore, Style from traceback import format_exc import os def check_code(filename): end = PyBackEnd() # try: end.main(filename, filename + '.sij') # except Exception as e: # print(e) # pass tc = end.top # print('checked:', Fore.GREEN) # for k, v in tc.tenv.items(): # print(k.name, ':', tc.tc_state.infer(v)) # print(Style.RESET_ALL) if __name__ == '__main__': call(check_code)