コード例 #1
0
ファイル: test_parse_func.py プロジェクト: vanyakosmos/argser
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]]
コード例 #2
0
ファイル: dev3.py プロジェクト: RemuLang/urgent-lang
from urgent.cli import cc
from argser import call
call(cc)
コード例 #3
0
ファイル: dev.py プロジェクト: RemuLang/urgent-lang
from urgent.repl1s import repl
from argser import call

call(repl)
コード例 #4
0
ファイル: cli.py プロジェクト: nobodxbodon/muridesu-lang
def main():
    from argser import call
    call(comp)
コード例 #5
0
ファイル: checkprd.py プロジェクト: RemuLang/proud
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)