turn mypy checks back on, fix some errors

This commit is contained in:
pacrob
2024-04-27 09:41:56 -06:00
committed by Paul Robinson
parent f0fbd2d8c8
commit 8dda7b933e
11 changed files with 39 additions and 33 deletions

View File

@ -56,7 +56,8 @@ class PublicKey(Key):
"""Return the protobuf representation of this ``Key``."""
key_type = self.get_type().value
data = self.to_bytes()
protobuf_key = protobuf.PublicKey(key_type=key_type, data=data)
# type ignored - TODO add ECD_P256 to KeyType
protobuf_key = protobuf.PublicKey(key_type=key_type, data=data) # type: ignore
return protobuf_key
def serialize(self) -> bytes:
@ -83,7 +84,8 @@ class PrivateKey(Key):
"""Return the protobuf representation of this ``Key``."""
key_type = self.get_type().value
data = self.to_bytes()
protobuf_key = protobuf.PrivateKey(key_type=key_type, data=data)
# type ignored - TODO add ECD_P256 to KeyType
protobuf_key = protobuf.PrivateKey(key_type=key_type, data=data) # type: ignore
return protobuf_key
def serialize(self) -> bytes: