mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-10 07:00:54 +00:00
turn mypy checks back on, fix some errors
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user