Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ParamSpec for decorators etc. #692

Open
ZdenekM opened this issue Dec 28, 2021 · 1 comment
Open

Use ParamSpec for decorators etc. #692

ZdenekM opened this issue Dec 28, 2021 · 1 comment

Comments

@ZdenekM
Copy link
Member

ZdenekM commented Dec 28, 2021

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
Copy link
Member Author

ZdenekM commented Jan 24, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant