Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dataclasses for add_key #91

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Use dataclasses for add_key #91

merged 1 commit into from
Nov 17, 2023

Conversation

robin-nitrokey
Copy link
Member

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: #45

Copy link

codecov bot commented Nov 17, 2023

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 ⚠️
Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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: #45
@robin-nitrokey robin-nitrokey merged commit 16e9740 into main Nov 17, 2023
8 checks passed
@robin-nitrokey robin-nitrokey deleted the add-key branch November 17, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor add_key
1 participant