Server declared with python 3 typing
It would be great if we could take advantage of python 3 typing hints to write PyTango servers.
Here is a concrete example:
from typing import List
from tango.server import Device, attribute, command
class PowerSupply(Device):
@attribute(label='Voltage')
def voltage(self) -> float:
return 1.0
@voltage.setter
def voltage(self, new_voltage: float):
pass
@attribute
def trend(self) -> List[float]:
return range(10)
@command
def RampUp(self, target: float) -> str:
return 'OK'
Edited by Yury Matveev