Fix the command decorator typing.

This commit is contained in:
Sleepy Monax 2024-02-15 17:46:33 +01:00
parent cc9f7c7b3f
commit 7743b566bd

View file

@ -687,7 +687,7 @@ def _resolvePath(path: list[str]) -> Command:
return cmd return cmd
def command(shortName: str, longName: str, description: str = "") -> Callable: def command(shortName: Optional[str], longName: str, description: str = "") -> Callable:
def wrap(fn: Callable): def wrap(fn: Callable):
schema = Schema.extractFromCallable(fn) schema = Schema.extractFromCallable(fn)
path = _splitPath(longName) path = _splitPath(longName)