Nitrokey / nethsm-sdk-py

Client-side Python SDK for NetHSM
Apache License 2.0
2 stars 3 forks source link

Use dataclasses for add_key #91

Closed robin-nitrokey closed 10 months ago

robin-nitrokey commented 10 months ago

This patch introduces the RsaPrivateKey and GenericPrivateKey dataclasses for the add_key method to make it possible to enforce that exactly only one type of private key is provided using typing.

Fixes: https://github.com/Nitrokey/nethsm-sdk-py/issues/45

codecov[bot] commented 10 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1e91dcc) 79.99% compared to head (7bff595) 80.00%.

Files Patch % Lines
nethsm/__init__.py 83.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #91 +/- ## ========================================== + Coverage 79.99% 80.00% +0.01% ========================================== Files 751 751 Lines 13333 13340 +7 ========================================== + Hits 10666 10673 +7 Misses 2667 2667 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.