From 6c965332b7aecf99945761b5ac74aa4feb47b1f6 Mon Sep 17 00:00:00 2001 From: John Weldon Date: Thu, 17 Oct 2024 18:01:10 -0700 Subject: [PATCH] yapf --- nats/aio/client.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nats/aio/client.py b/nats/aio/client.py index e989dbcf..81e65f50 100644 --- a/nats/aio/client.py +++ b/nats/aio/client.py @@ -559,11 +559,8 @@ def sig_cb(nonce: str) -> bytes: return sig self._signature_cb = sig_cb - elif ( - isinstance(creds, str) - or isinstance(creds, UserString) - or isinstance(creds, Path) - ): + elif (isinstance(creds, str) or isinstance(creds, UserString) + or isinstance(creds, Path)): # Define the functions to be able to sign things using nkeys. def user_cb() -> bytearray: return self._read_creds_user_jwt(creds) @@ -584,7 +581,10 @@ def sig_cb(nonce: str) -> bytes: self._signature_cb = sig_cb - def _read_creds_user_nkey(self, creds: str | UserString | Path) -> bytearray: + def _read_creds_user_nkey( + self, creds: str | UserString | Path + ) -> bytearray: + def get_user_seed(f): for line in f: # Detect line where the NKEY would start and end, @@ -613,6 +613,7 @@ def get_user_seed(f): return get_user_seed(f) def _read_creds_user_jwt(self, creds: str | RawCredentials | Path): + def get_user_jwt(f): user_jwt = None while True: