You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue will help to track typing issues in Datalab as well as proposals.
Typing errors
SignalObj.get_data() returns a tuple[np.ndarray, np.ndarray] and not a single np.ndarray. The signature of the BaseObj.get_data could be modify to allow type changes for child classes
Many paramclass arguments/attributes are annotated with MyClass instead of type[MyClass]. eg: in ObjectProp.__init__() or BaseProcessor.init_param().
missing types in fitdialogs.py.
cdl.core.model.signal.new_signal_param() argument stype takes a string or None but is compatible with SignalTypes members.
BaseProcessor.compute_10 my return a typing error if parent function is typed to only return a dict of ResultProperties or ResultShape instead of a union of both. Could be fixed by using a Generic bound to both result types. Therefore, the return type of BaseProcessor.compute_10 would be definded by the return type of the function passed into it.
BaseDataPanel.save_to_files() does not have the right typing argument filenames is hinted as str but type not supported inside the method.
Proposals
Use generics in base classes that are derived into signal and image classes. eg: in BaseActionHandler, the panel attribute should be a generic that is set to SignalProcessor in SignalActionHandler and vice versa in ImageActionHandler. The same principle could be applied in the BaseProcessor and other.
The text was updated successfully, but these errors were encountered:
This issue will help to track typing issues in Datalab as well as proposals.
Typing errors
SignalObj.get_data()
returns atuple[np.ndarray, np.ndarray]
and not a singlenp.ndarray
. The signature of the BaseObj.get_data could be modify to allow type changes for child classesparamclass
arguments/attributes are annotated withMyClass
instead oftype[MyClass]
. eg: inObjectProp.__init__()
orBaseProcessor.init_param()
.fitdialogs.py
.cdl.core.model.signal.new_signal_param()
argumentstype
takes a string or None but is compatible with SignalTypes members.BaseProcessor.compute_10
my return a typing error if parent function is typed to only return a dict ofResultProperties
orResultShape
instead of a union of both. Could be fixed by using a Generic bound to both result types. Therefore, the return type ofBaseProcessor.compute_10
would be definded by the return type of the function passed into it.BaseDataPanel.save_to_files()
does not have the right typing argumentfilenames
is hinted as str but type not supported inside the method.Proposals
BaseActionHandler
, thepanel
attribute should be a generic that is set toSignalProcessor
inSignalActionHandler
and vice versa inImageActionHandler
. The same principle could be applied in theBaseProcessor
and other.The text was updated successfully, but these errors were encountered: