We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems Pylance is unable to infer the return type of decorated functions, I tried
import typing ReturnType = typing.TypeVar('ReturnType') def my_parametrized_decorator(my_parameter): def decorator(decorated_func: typing.Callable[..., typing.Awaitable[ReturnType]]): async def wrapper(*args, **kwargs): return await decorated_func(*args, **kwargs) return wrapper return decorator @my_parametrized_decorator('foo') async def foo() -> typing.List[str]: return ['foo', 'bar']
I expected Pylance to show the return type of foo is List[str] but it shows ReturnType
foo
List[str]
ReturnType
The text was updated successfully, but these errors were encountered:
Please refer to this issue: microsoft/pyright#774
Sorry, something went wrong.
It worked, thanks.
No branches or pull requests
It seems Pylance is unable to infer the return type of decorated functions, I tried
I expected Pylance to show the return type of
foo
isList[str]
but it showsReturnType
The text was updated successfully, but these errors were encountered: