Skip to content

Commit

Permalink
Fixed help, and usage subcommands not working if the subcommand didn'…
Browse files Browse the repository at this point in the history
…t had any arguments.
  • Loading branch information
sleepy-monax committed Oct 12, 2024
1 parent c684ba9 commit 09c958b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cutekit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,10 @@ def parse(self, args: list[str]) -> Any:
return res


class NoArgs:
pass


@dt.dataclass
class Command:
"""
Expand Down Expand Up @@ -887,6 +891,7 @@ def invoke(self, argv: list[str]):
args = self.schema.parse(argv)
self.callable(args)
else:
Schema.extract(NoArgs).parse(argv)
self.callable()

def eval(self, args: list[str]):
Expand Down

0 comments on commit 09c958b

Please sign in to comment.