Skip to content

Commit

Permalink
yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
johnweldon committed Oct 18, 2024
1 parent c121e1a commit 6c96533
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions nats/aio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6c96533

Please sign in to comment.