mypy protobuf plugin requires keyword-based initializers
This commit is contained in:
parent
82bae341a7
commit
9a4e23a803
|
@ -46,11 +46,9 @@ class PublicKey(Key):
|
||||||
...
|
...
|
||||||
|
|
||||||
def serialize_to_protobuf(self) -> protobuf.PublicKey:
|
def serialize_to_protobuf(self) -> protobuf.PublicKey:
|
||||||
_type = self.get_type()
|
key_type = self.get_type().value
|
||||||
data = self.to_bytes()
|
data = self.to_bytes()
|
||||||
protobuf_key = protobuf.PublicKey()
|
protobuf_key = protobuf.PublicKey(key_type=key_type, data=data)
|
||||||
protobuf_key.key_type = _type.value
|
|
||||||
protobuf_key.data = data
|
|
||||||
return protobuf_key
|
return protobuf_key
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,11 +66,9 @@ class PrivateKey(Key):
|
||||||
...
|
...
|
||||||
|
|
||||||
def serialize_to_protobuf(self) -> protobuf.PrivateKey:
|
def serialize_to_protobuf(self) -> protobuf.PrivateKey:
|
||||||
_type = self.get_type()
|
key_type = self.get_type().value
|
||||||
data = self.to_bytes()
|
data = self.to_bytes()
|
||||||
protobuf_key = protobuf.PrivateKey()
|
protobuf_key = protobuf.PrivateKey(key_type=key_type, data=data)
|
||||||
protobuf_key.key_type = _type.value
|
|
||||||
protobuf_key.data = data
|
|
||||||
return protobuf_key
|
return protobuf_key
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user