arcor2 icon indicating copy to clipboard operation
arcor2 copied to clipboard

Use ParamSpec for decorators etc.

Open ZdenekM opened this issue 3 years ago • 1 comments

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.

ZdenekM avatar Dec 28 '21 16:12 ZdenekM

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...

ZdenekM avatar Jan 24 '22 14:01 ZdenekM