From b22215a93b9920ef0105a273f86c382dc1bd15ee Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 24 Oct 2019 12:39:17 +0200 Subject: [PATCH] Type .optional --- royalnet/commands/commandargs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/royalnet/commands/commandargs.py b/royalnet/commands/commandargs.py index 39d91723..34870ae5 100644 --- a/royalnet/commands/commandargs.py +++ b/royalnet/commands/commandargs.py @@ -55,7 +55,7 @@ class CommandArgs(list): raise InvalidInputError("Invalid syntax.") return match.groups() - def optional(self, index: int, default=None): + def optional(self, index: int, default=None) -> typing.Optional[str]: """Get the argument at a specific index, but don't raise an error if nothing is found, instead returning the ``default`` value. Parameters: