mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-23 15:08:00 +00:00
fix linter warnings
This commit is contained in:
parent
e4bcbdeccb
commit
c2b88b6dd8
|
@ -400,15 +400,11 @@ def cli_user_create(ctx: click.Context, username: str, handle: str) -> None:
|
||||||
return
|
return
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
password = click.prompt('New password', hide_input = True)
|
if not (password := click.prompt('New password', hide_input = True)):
|
||||||
|
|
||||||
if not password:
|
|
||||||
click.echo('No password provided')
|
click.echo('No password provided')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
password2 = click.prompt('New password again', hide_input = True)
|
if password != click.prompt('New password again', hide_input = True):
|
||||||
|
|
||||||
if password != password2:
|
|
||||||
click.echo('Passwords do not match')
|
click.echo('Passwords do not match')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -471,7 +467,7 @@ def cli_user_delete_token(ctx: click.Context, code: str) -> None:
|
||||||
'Delete an API token'
|
'Delete an API token'
|
||||||
|
|
||||||
with ctx.obj.database.connection() as conn:
|
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')
|
click.echo('Token does not exist')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue