feat: add cython defs for Variant class (#74)

This commit is contained in:
J. Nick Koston 2022-10-05 14:42:33 -10:00 committed by GitHub
parent cf1f0129ba
commit cd08f063cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -14,3 +14,10 @@ cdef class SignatureTree:
cdef public str signature
cdef public list types
cdef class Variant:
cdef public object type
cdef public str signature
cdef public object value

View File

@ -403,7 +403,8 @@ class Variant:
signature: Union[str, SignatureTree, SignatureType],
value: Any,
verify: bool = True,
):
) -> None:
"""Init a new Variant."""
if type(signature) is SignatureTree:
signature_tree = signature
elif type(signature) is SignatureType: