From e0451d116a09b53735b8e814ddceca25d0da532a Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Thu, 21 Nov 2024 10:04:59 +0200 Subject: [PATCH] fix style --- nc_password_client/nc_password_client.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/nc_password_client/nc_password_client.py b/nc_password_client/nc_password_client.py index e609c1c..e4e1614 100755 --- a/nc_password_client/nc_password_client.py +++ b/nc_password_client/nc_password_client.py @@ -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):