You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.
If you have a question about typing or a behavior that you’re seeing in Pyright (as opposed to a bug report or enhancement request), consider posting to the Pyright discussion forum.
Describe the bug
I read that [a wrong signature of a function or a class in the standard library] should be reported to typeshed
but the signature of functools.lru_cache seems to be doing fine, however,
when a function is decorated by functools.lru_cache, its typing info would be lost
Code or Screenshots
@lru_cachedeftest(a: int) ->int:
returnatest() # this woud not show any error
If your code relies on symbols that are imported from a third-party library, include the associated import statements and specify which versions of those libraries you have installed.
VS Code extension or command-line
Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?
vscode latest version
The text was updated successfully, but these errors were encountered:
Pyright is working as designed here. It's applying the type information supplied in the functools.pyi type stub.
If you would like to report a problem with the way lru_cache is defined in typeshed, please file a bug in the typeshed project. The current definition does not use a ParamSpec to retain the signature of the decorated function.
Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.
If you have a question about typing or a behavior that you’re seeing in Pyright (as opposed to a bug report or enhancement request), consider posting to the Pyright discussion forum.
Describe the bug
I read that [a wrong signature of a function or a class in the standard library] should be reported to typeshed
but the signature of functools.lru_cache seems to be doing fine, however,
when a function is decorated by functools.lru_cache, its typing info would be lost
Code or Screenshots
If your code relies on symbols that are imported from a third-party library, include the associated import statements and specify which versions of those libraries you have installed.
VS Code extension or command-line
Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?
vscode latest version
The text was updated successfully, but these errors were encountered: