========== Type Hints ========== .. automodule:: ska_tango_base.type_hints :members: :exclude-members: DevVarLongStringArrayType :special-members: __call__ .. py:class:: JSONData :canonical: ska_tango_base.type_hints.JSONData A type hint for any JSON-encodable data. .. code-block:: py JSONData = ( None | bool | int | float | str | list["JSONData"] # A list can contain more JSON-encodable data | dict[str, "JSONData"] # A dict must have str keys and JSON-encodable data | tuple["JSONData", ...] # A tuple can contain more JSON-encodable data ) .. py:class:: DevVarLongStringArrayType :canonical: ska_tango_base.type_hints.DevVarLongStringArrayType A type hint for the DevVarLongStringArray Tango data type. .. code-block:: py DevVarLongStringArrayType = tuple[list[ResultCode], list[str]] .. py:class:: ReadAttrType :canonical: ska_tango_base.type_hints.ReadAttrType A type hint for attribute read methods which may return a Tango data triple. .. code-block:: py AttrT = TypeVar("AttrT") ReadAttrType = AttrT | tuple[AttrT, float, AttrQuality] Usage: .. code-block:: py class MyDevice(Device): @attribute(dtype="DevLong") def myAttr(self) -> ReadAttrType[int]: return 0, time.now(), AttrQuality.ATTR_WARNING