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

Provide better type hints for combomethod #236

Open
darwintree opened this issue Nov 17, 2022 · 0 comments · May be fixed by #264
Open

Provide better type hints for combomethod #236

darwintree opened this issue Nov 17, 2022 · 0 comments · May be fixed by #264
Labels

Comments

@darwintree
Copy link

What was wrong?

The decorator combomethod is widely used in web3.py, eth-account packages. However, the language server cannot infer the type of the arguments from function wrapped by combomethod.

How can it be fixed?

Use ParamSpec added in python3.10 could fix this problem. As we need to provide support for versions minor to 3.10, we can import ParamSpec from typing-extensions. Here is a good solution.

@darwintree darwintree linked a pull request Jan 16, 2024 that will close this issue
3 tasks
@reedsa reedsa added the p3 label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants