@click.group()
def cli():
pass
@cli.command()
@cli.argument('table_name', help="spider Table name you want to stat")
def btc_stat(table_name):
class Stat(BaseBtcStat):
table_name = table_name
stat = Stat()
stat.run()
cli()
(.env) ➜ fibo_statistics git:(feature/wyx) ✗ python run_stat.py -h
Traceback (most recent call last):
File "run_stat.py", line 24, in <module>
@cli.argument('table_name', help="spider Table name you want to stat")
AttributeError: 'Group' object has no attribute 'argument'
Try @click.argument(...)
Most helpful comment
Try @click.argument(...)