autopushed

This commit is contained in:
2023-09-24 20:32:47 +02:00
parent d2c146547b
commit bedd37c590
+13
View File
@@ -47,6 +47,19 @@ class AgoraCmd(click.Command):
- Visit anagora.org/foo/1 to execute e.g. <bin/foo.py 1>, <exec/foo.py 1> from your garden.")
""")
def __call__(self, *args, **kwargs):
try:
return super(ShowUsageOnMissingError, self).__call__(
*args, standalone_mode=False, **kwargs)
except click.MissingParameter as exc:
exc.ctx = None
exc.show(file=sys.stdout)
click.echo()
try:
super(ShowUsageOnMissingError, self).__call__(['--help'])
except SystemExit:
sys.exit(exc.exit_code)
@click.command(cls=AgoraCmd)
@click.argument('n', type=click.INT)
def prime(n):