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
Language Server version: Pylance language server 2020.10.2
OS and version: Ubuntu 20.04.1
Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.0 / 3.7.4 via conda v4.8.4
Expected behaviour
When getting a signature preview of a function imported from another module, pylance shows the types from the associated stub if available.
When using showing the signature of a function defined in the same file, pylance should check if there is an associated stub and use that (and probably complain on mismatch if type checking is enabled).
Actual behaviour
The signature displayed while in the file does not show stub signatures. When referencing the same function in another file, the stub signature is used. The same behavior is seen whether using a stub directory or having the files side by side.
This quite unhelpful when using functions in the file they're declared in.
This really is a blocker for me. I would really prefer to store the typings in stub files but without this feature I can not enable strict type checking.
I wanted to unobtrusively add typings to a codebase that is not mine but with which I will have to work so that I can enable strict typing to check the code while keeping it unchanged.
Environment data
Expected behaviour
When getting a signature preview of a function imported from another module, pylance shows the types from the associated stub if available.
When using showing the signature of a function defined in the same file, pylance should check if there is an associated stub and use that (and probably complain on mismatch if type checking is enabled).
Actual behaviour
The signature displayed while in the file does not show stub signatures. When referencing the same function in another file, the stub signature is used. The same behavior is seen whether using a stub directory or having the files side by side.
This quite unhelpful when using functions in the file they're declared in.
Logs
Code Snippet / Additional information
bar.py
:bar.pyi
:from
foo.py
:from
bar.py
:The text was updated successfully, but these errors were encountered: