Skip to content

Commit

Permalink
feat: add cython defs for Variant class (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 6, 2022
1 parent cf1f012 commit cd08f06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/dbus_fast/signature.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion src/dbus_fast/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ def __init__(
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:
Expand Down

0 comments on commit cd08f06

Please sign in to comment.