From c2b88b6dd8b563a1ca803660404d6f241519d836 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Wed, 14 Feb 2024 14:24:16 -0500 Subject: [PATCH] fix linter warnings --- relay/manage.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/relay/manage.py b/relay/manage.py index 039a6f5..e8aab1b 100644 --- a/relay/manage.py +++ b/relay/manage.py @@ -400,15 +400,11 @@ def cli_user_create(ctx: click.Context, username: str, handle: str) -> None: return while True: - password = click.prompt('New password', hide_input = True) - - if not password: + if not (password := click.prompt('New password', hide_input = True)): click.echo('No password provided') continue - password2 = click.prompt('New password again', hide_input = True) - - if password != password2: + if password != click.prompt('New password again', hide_input = True): click.echo('Passwords do not match') continue @@ -471,7 +467,7 @@ def cli_user_delete_token(ctx: click.Context, code: str) -> None: 'Delete an API token' with ctx.obj.database.connection() as conn: - if not (conn.get_token(code)): + if not conn.get_token(code): click.echo('Token does not exist') return