utils.parse.timed_args() min_args should be optional

This commit is contained in:
jesopo 2020-01-24 15:29:39 +00:00
parent 4e2f463d39
commit 47cb5eaab8

View file

@ -110,7 +110,7 @@ def parse_number(s: str) -> str:
raise ValueError("Unknown unit '%s' given to parse_number" % unit) raise ValueError("Unknown unit '%s' given to parse_number" % unit)
return str(number) return str(number)
def timed_args(args, min_args): def timed_args(args, min_args: int=0):
if args and args[0][0] == "+": if args and args[0][0] == "+":
if len(args[1:]) < min_args: if len(args[1:]) < min_args:
raise errors.EventError("Not enough arguments") raise errors.EventError("Not enough arguments")