Fix commands with dtype_in=DevVoid and *args, and avoid Uninitialised command in/out descriptions
Two related changes, from the 10.1.0rc1 testing. It is suggested to review the two commits separately.
Part 1: Fix commands with dtype_in=DevVoid and *args
The facadedevice library creates dynamic commands with a lambda function that has the signature (device, *args). This is used for proxying various commands, some of which could have no input parameter. This breaks since !847 (merged) (so not in 10.0.3, or earlier).
The error is like:
def get_tango_type_format(dtype, dformat=None, caller=None):
if dformat is None:
...
try:
> tango_type = TO_TANGO_TYPE[dtype]
^^^^^^^^^^^^^^^^^^^^
E KeyError: <class 'inspect._empty'>
/env/lib/python3.13/site-packages/tango/utils.py:522: KeyError
During handling of the above exception, another exception occurred:
def test_emulated_proxy_command():
> class Test(Facade):
The check for empty annotations was incorrect.
Part 2: Avoid "Uninitialised" command doc_in and doc_out
When building up command docstrings, we also checked for empty
annotations in the wrong way. We didn't actually need the check.
However, there was another problem related to the *args input - the dtype_in is not None
check needs to check for CmdArgType.DevVoid.
Added a check for DevVoid.
When trying to test the docstrings for commands with
dtype_in=DevVoid and *args commands, it was noticed that the
__build_command_doc code would be better if it was always used to
populate empty doc_in and doc_out fields.
This change was made, and now we no longer get commands that have "Uninitialised" descriptions.