utils.parse.timed_args() min_args should be optional
This commit is contained in:
parent
4e2f463d39
commit
47cb5eaab8
1 changed files with 1 additions and 1 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue