If we define the return type in a function:
def do_something(input_data: str) -> str:
this will break its execution using the new opmode.py.
The problem is in typing.get_type_hints() function - it will return return as one of type hints:
>> typing.get_type_hints(do_something) {'input_data': <class 'str'>, 'return': <class 'str'>}
What will be wrongly interpreted by opmode.py as a required argument for operation: https://github.com/vyos/vyos-1x/blob/b01f27b3bb3f4cbc6096011856d83009d0440313/python/vyos/opmode.py#L107-L117
We need to add an exception to the return hint to skip it.