arcor2
arcor2 copied to clipboard
Use ParamSpec for decorators etc.
The newest mypy 0.930 supports ParamSpec (PEP 612), which might be highly useful for e.g. run_in_executor, where otherwise function/method parameters are not checked properly.
An attempt was made in https://github.com/ZdenekM/arcor2/tree/paramspec, but there is something wrong with it...
src/python/arcor2_arserver/objects_actions.py:268: error: Argument 3 to
"run_in_executor" has incompatible type "Type[Generic]"; expected "Type[T]"
Generic,
^
src/python/arcor2_arserver/scene.py:305: error: Argument 2 to "run_in_executor"
has incompatible type "str"; expected <nothing>
obj_type.type_def, obj.id, obj.name, obj.pose, set...