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
Expected:
When Ctrl-clicking on a function from a given package, the editor opens the actual file in which the function definition is found in the virtual environment.
Actual:
When Ctrl-clicking on a function from a given package, the editor opens the typeshed file matching the definition installed within the extension itself.
Create a new venv: python -m venv env && source env/bin/activate
Install flask: pip install flask
Mouse hover over from_app and click.
The editor will bring up the typeshed in the extension directory, ~/.vscode-oss/extensions/ms-python.python-2023.4.1-universal/pythonFiles/lib/jedilsp/jedi/third_party/typeshed/third_party/2and3/flask/blueprints.pyi instead of opening env/lib64/python3.X/site-packages/flask/blueprints.py, which is what eg. mypy will use to check the project against.
Expected vs. Actual
Expected:
When Ctrl-clicking on a function from a given package, the editor opens the actual file in which the function definition is found in the virtual environment.
Actual:
When Ctrl-clicking on a function from a given package, the editor opens the typeshed file matching the definition installed within the extension itself.
How to reproduce
(Using Flask here as an example)
python -m venv env
&&source env/bin/activate
The editor will bring up the typeshed in the extension directory,
~/.vscode-oss/extensions/ms-python.python-2023.4.1-universal/pythonFiles/lib/jedilsp/jedi/third_party/typeshed/third_party/2and3/flask/blueprints.pyi
instead of openingenv/lib64/python3.X/site-packages/flask/blueprints.py
, which is what eg. mypy will use to check the project against.The hover I see:
Technical details
The Flask v2 signature: https://github.com/pallets/flask/blob/main/src/flask/blueprints.py#L408
While it is the old Flask v1 here: https://github.com/davidhalter/typeshed/blob/jedi/third_party/2and3/flask/blueprints.pyi#L55
Jedi looks to act normally, so I believe the problem is how it is used by
jedi-language-server
:provide_automatic_options
parameter is present and only Flask v2.Note: The issue was originally open here: microsoft/vscode-python#20988
The text was updated successfully, but these errors were encountered: