Skip to content

Commit

Permalink
Fix type annotations for add_key (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey authored Nov 23, 2023
1 parent 1eb39be commit 61b742c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nethsm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def get_key_public_key(self, key_id: str) -> str:

def add_key(
self,
key_id: str,
key_id: Optional[str],
type: KeyType,
mechanisms: list[KeyMechanism],
private_key: PrivateKey,
Expand Down Expand Up @@ -954,6 +954,7 @@ def add_key(
409: f"Conflict -- a key with the ID {key_id} already exists",
},
)
assert key_id
return key_id

def delete_key(self, key_id: str) -> None:
Expand Down

0 comments on commit 61b742c

Please sign in to comment.