Skip to content

Commit

Permalink
get import nkeys back to the methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Kudrow committed Oct 16, 2024
1 parent 2b85e34 commit 77c436a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nats/aio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union
from urllib.parse import ParseResult, urlparse

import nkeys
try:
from fast_mail_parser import parse_email
except ImportError:
Expand Down Expand Up @@ -530,6 +529,8 @@ def _setup_nkeys_connect(self) -> None:
def _setup_nkeys_jwt_connect(self) -> None:
assert self._user_credentials, "_user_credentials required"

import nkeys

creds: Credentials = self._user_credentials

if isinstance(creds, tuple):
Expand Down Expand Up @@ -633,6 +634,8 @@ def _setup_nkeys_seed_connect(self) -> None:
self._nkeys_seed or self._nkeys_seed_str
), "Client.connect must be called first"

import nkeys

def _get_nkeys_seed() -> nkeys.KeyPair:
if self._nkeys_seed_str:
seed = bytearray(self._nkeys_seed_str.encode())
Expand Down

0 comments on commit 77c436a

Please sign in to comment.