Skip to content

Commit

Permalink
Run ruff tool chain
Browse files Browse the repository at this point in the history
  • Loading branch information
robigan committed Feb 21, 2024
1 parent 30faa67 commit 3984bf1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions backend/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from bracket.config import config
from bracket.database import database
from bracket.logger import get_logger
from bracket.utils.db_init import sql_create_dev_db
from bracket.utils.security import hash_password
from bracket.models.db.account import UserAccountType
from bracket.models.db.user import User
from bracket.sql.users import (
check_whether_email_is_in_use,
create_user,
)
from bracket.models.db.user import User
from bracket.models.db.account import UserAccountType
from bracket.utils.db_init import sql_create_dev_db
from bracket.utils.security import hash_password
from bracket.utils.types import assert_some

logger = get_logger("cli")
Expand Down Expand Up @@ -65,10 +65,11 @@ def hash_password_cmd() -> None:
async def create_dev_db() -> None:
await sql_create_dev_db()


@click.command()
@click.option('--email', prompt='Email', help='The email used to log into the account.')
@click.option('--password', prompt='Password', help='The password used to log into the account.')
@click.option('--name', prompt='Name', help='The name associated with the account.')
@click.option("--email", prompt="Email", help="The email used to log into the account.")
@click.option("--password", prompt="Password", help="The password used to log into the account.")
@click.option("--name", prompt="Name", help="The name associated with the account.")
@run_async
async def register_user(email: str, password: str, name: str) -> None:
user = User(
Expand All @@ -85,6 +86,7 @@ async def register_user(email: str, password: str, name: str) -> None:
assert_some(user_created.id)
logger.info(f"Created user with id: {user_created.id}")


if __name__ == "__main__":
cli.add_command(create_dev_db)
cli.add_command(hash_password_cmd)
Expand Down

0 comments on commit 3984bf1

Please sign in to comment.