diff --git a/bin/vyper b/bin/vyper index 0bf2fc7f43..4e352a8ad0 100755 --- a/bin/vyper +++ b/bin/vyper @@ -12,20 +12,13 @@ from vyper.parser.parser import parse_to_lll from vyper.parser import parser_utils from vyper import compile_lll + warnings.simplefilter('always') sys.tracebacklimit = 0 tb_limit = os.environ.get('VYPER_TRACEBACK_LIMIT') if tb_limit: sys.tracebacklimit = int(tb_limit) -parser = argparse.ArgumentParser(description='Vyper programming language for Ethereum') -parser.add_argument('--version', action='version', version='{0}'.format(vyper.__version__)) -parser.add_argument('input_file', help='Vyper sourcecode to compile') -parser.add_argument('-f', help='Format to print', default='bytecode', dest='format') -parser.add_argument('--show-gas-estimates', help='Show gas estimates in ir output mode.', action="store_true") - -args = parser.parse_args() - def uniq(seq): exists = set() @@ -90,6 +83,14 @@ if __name__ == '__main__': output_format['source_map'] = get_source_map output_format['source_map_asm_list'] = get_source_map_asm_list + parser = argparse.ArgumentParser(description='Vyper programming language for Ethereum') + parser.add_argument('--version', action='version', version='{0}'.format(vyper.__version__)) + parser.add_argument('input_file', help='Vyper sourcecode to compile') + parser.add_argument('-f', help='Format to print. Options: {}'.format(', '.join(output_format.keys())), default='bytecode', dest='format') + parser.add_argument('--show-gas-estimates', help='Show gas estimates in ir output mode.', action="store_true") + + args = parser.parse_args() + with open(args.input_file) as fh: code = fh.read()