Skip to content

Commit

Permalink
refactor: shorten cli code
Browse files Browse the repository at this point in the history
  • Loading branch information
jckdotim committed Jun 10, 2019
1 parent 79ec718 commit 2ff7115
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ def cli():
pass


@click.command()
@cli.command()
def createdb():
db.create_all()


@click.command()
@cli.command()
def dropdb():
db.drop_all()


cli.add_command(createdb)
cli.add_command(dropdb)


if __name__ == '__main__':
cli()

0 comments on commit 2ff7115

Please sign in to comment.