diff --git a/src/python/code/gnoll/__main__.py b/src/python/code/gnoll/__main__.py index 84fbec94b..1182ef084 100644 --- a/src/python/code/gnoll/__main__.py +++ b/src/python/code/gnoll/__main__.py @@ -14,31 +14,57 @@ def parse_cmdline_args(args): usage='python3 -m gnoll [options] EXPR', add_help=False) - p.add_argument( - 'EXPR', + 'EXPR', nargs='+', - help='a dice expression to evaluate (multiple arguments will be joined with spaces)' + help='a dice expression to evaluate' + '(multiple arguments will be joined with spaces)' ) g = p.add_argument_group('main options') - g.add_argument('-h', '--help', action='help', - help='show this help message and exit') - g.add_argument('-b', '--breakdown', action='store_true', - help='show a breakdown into individual dice') - g.add_argument('--no-builtins', action='store_true', - help='disable built-in macros') + g.add_argument( + '-h', + '--help', + action='help', + help='show this help message and exit' + ) + g.add_argument( + '-b', + '--breakdown', + action='store_true', + help='show a breakdown into individual dice' + ) + g.add_argument( + '--no-builtins', + action='store_true', + help='disable built-in macros' + ) g = p.add_argument_group('debugging options') - g.add_argument('-v', '--verbose', action='store_true', - help='enable verbosity') - g.add_argument('--keep-temp-file', action='store_true', - help="don't delete the created temporary file") - g.add_argument('--mock', metavar='TYPE', type=int, - help='mocking type') - g.add_argument('--mock-const', metavar='N', type=int, default=3, - help='mocking constant') - + g.add_argument( + '-v', + '--verbose', + action='store_true', + help='enable verbosity' + ) + g.add_argument( + '--keep-temp-file', + action='store_true', + help="don't delete the created temporary file" + ) + g.add_argument( + '--mock', + metavar='TYPE', + type=int, + help='mocking type' + ) + g.add_argument( + '--mock-const', + metavar='N', + type=int, + default=3, + help='mocking constant' + ) a = p.parse_args(args) a.EXPR = ' '.join(a.EXPR) @@ -54,7 +80,7 @@ def main(EXPR, no_builtins, **kwargs): """ _, [[result]], breakdown = gnoll.roll( EXPR, - builtins = not no_builtins, + builtins=not no_builtins, **kwargs) if breakdown: print(breakdown[0], '-->', result)