feat: add cython defs for Variant class (#74)
This commit is contained in:
@@ -14,3 +14,10 @@ cdef class SignatureTree:
|
|||||||
|
|
||||||
cdef public str signature
|
cdef public str signature
|
||||||
cdef public list types
|
cdef public list types
|
||||||
|
|
||||||
|
|
||||||
|
cdef class Variant:
|
||||||
|
|
||||||
|
cdef public object type
|
||||||
|
cdef public str signature
|
||||||
|
cdef public object value
|
||||||
|
|||||||
@@ -403,7 +403,8 @@ class Variant:
|
|||||||
signature: Union[str, SignatureTree, SignatureType],
|
signature: Union[str, SignatureTree, SignatureType],
|
||||||
value: Any,
|
value: Any,
|
||||||
verify: bool = True,
|
verify: bool = True,
|
||||||
):
|
) -> None:
|
||||||
|
"""Init a new Variant."""
|
||||||
if type(signature) is SignatureTree:
|
if type(signature) is SignatureTree:
|
||||||
signature_tree = signature
|
signature_tree = signature
|
||||||
elif type(signature) is SignatureType:
|
elif type(signature) is SignatureType:
|
||||||
|
|||||||
Reference in New Issue
Block a user