diff --git a/pyjapc/_japc.py b/pyjapc/_japc.py index ecdf38fd1ef2ccebb45229a9c4b7c3c88af9a31f..09499d4d946e7782182f8909aa8a8a3f877bca99 100644 --- a/pyjapc/_japc.py +++ b/pyjapc/_japc.py @@ -47,7 +47,7 @@ class PyJapc: def __init__( self, selector: pyjapc_types.Selector = "LHC.USER.ALL", - incaAcceleratorName: str = "auto", + incaAcceleratorName: typing.Optional[str] = "auto", noSet: bool = False, timeZone: typing.Optional[pyjapc_types.Timezone] = "utc", logLevel: typing.Optional[pyjapc_types.LogLevel] = None, @@ -70,7 +70,8 @@ class PyJapc: Injector Control Architecture (InCA) framework. It can be any of ``AD``, ``CTF3``, ``ISOLDE``, ``LEIR``, ``LHC``, ``LINAC4``, ``NORTH``, ``PS``, - ``PSB``, ``SCT``, ``SPS`` or can be even an empty string (``""``). + ``PSB``, ``SCT``, ``SPS`` or can be even an empty string (``""``). The valid values come + from the ``cern.accsoft.commons.domain.CernAccelerator`` class. You might need to call :meth:`rbacLogin()` to make full use of InCA. @@ -597,15 +598,15 @@ class PyJapc: Then the result lists will be in the same order as the parameterName list. - noPyConversion: Set to ``True`` if you want to get the raw JAPC + noPyConversion (bool): Set to ``True`` if you want to get the raw JAPC ``ParameterValue`` object instead of a Python native type. You will have to extract the values yourself. - unixtime: If ``True`` and ``noPyConversion`` is ``False``, the + unixtime (bool): If ``True`` and ``noPyConversion`` is ``False``, the header will be converted but the ``acqStamp`` and ``cycleStamp`` will be returned as seconds since epoch. - onValueReceived: + onValueReceived (function): If you get an asynchronous simple parameter value, the callback function should be like:: @@ -713,6 +714,7 @@ class PyJapc: def setParam( self, parameterName: str, + # TODO: There are more types needed here. parameterValue: typing.Union[bool, int, float, str, np.ndarray], checkDims: bool = True, dtype: typing.Optional[typing.Union[str, typing.Type]] = None, @@ -1743,7 +1745,7 @@ class PyJapc: return val @typing.overload - def _convertValToPy(self, val: cern.japc.value.MapParameterValue) -> typing.Dict: ... + def _convertValToPy(self, val: cern.japc.value.MapParameterValue) -> typing.Dict[str, typing.Any]: ... @typing.overload def _convertValToPy(self, val: cern.japc.value.ParameterValue) -> typing.Any: