fix style

This commit is contained in:
Antonio J. Delgado 2024-11-21 10:04:59 +02:00
parent 7475c40308
commit e0451d116a

View file

@ -648,7 +648,7 @@ class NextcloudHandler:
def close_passwords_session(self):
'''Close Passwords API session'''
return self.get("index.php/apps/passwords/api/1.0/session/close")
def list_passwords(self):
'''List all passwords'''
if self.cache['last_update'] < (time.time() - self.cache_duration):
@ -665,7 +665,7 @@ class NextcloudHandler:
)
if self.cache['cached_passwords']:
self.cache['last_update'] = time.time()
self._write_cache()
self._write_cache()
else:
self.debug(
{ "action": "list_passwords", "message": "Reusing cached list of password" }
@ -1012,7 +1012,13 @@ class NextcloudHandler:
if self.is_same_key('url', obj1, obj2):
#if self.is_same_key('folder', obj1, obj2):
self.debug(
{ "action": "notify_match", "object": { "obj1": safer_obj1, "obj2": safer_obj2 } }
{
"action": "notify_match",
"object": {
"obj1": safer_obj1,
"obj2": safer_obj2
}
}
)
return True
return False
@ -1513,8 +1519,16 @@ def delete_passwords_folder(ctx, name):
ctx.obj['NcPasswordClient'].delete_passwords_folder(name)
@cli.command()
@click.option('--pattern', '-p', required=True, help='Regular expression pattern to search in the password fields')
@click.option('--limit', '-l', default=-1, help='Maximun number of passwords to show. -1 for unlimited.')
@click.option(
'--pattern', '-p',
required=True,
help='Regular expression pattern to search in the password fields'
)
@click.option(
'--limit', '-l',
default=-1,
help='Maximun number of passwords to show. -1 for unlimited.'
)
@click_config_file.configuration_option()
@click.pass_context
def search(ctx, pattern, limit):