Open b-a0 opened 7 months ago
I'm unable to repro this. For example, there's no diagnostic shown in the screenshot below, whereas in a normal .py
file x: int = "str"
would generate a diagnostic. I have python.analysis.typeCheckingMode
set to "basic".
Can you provide steps to reproduce this issue? And a screenshot?
Unless you're referring to the behavior below where diagnostics are shown within "cells" marked by #%%
in a .py
file? If so, I'd say that's by design. Also, I believe the main point of https://github.com/microsoft/vscode-jupyter/issues/8289 was that code once executed in the Interactive Window can't be changed/fixed, so showing diagnostics there is distracting. But in this scenario you can modify the code, so showing diagnostics makes sense.
It's not about the # %%
cells, but about the unchangeable, executed code in the Interactive Window.
Steps to reproduce:
.vscode/
content:
settings.json
{
"python.analysis.typeCheckingMode": "basic",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
}
launch.json
environment.yml
x: int = "str"
in the interactive windowBelow are my overall VS Code user settings. As you can see I've tried excluding the interactive window from Pylance analysis through the key python.analysis.exclude
, but that does not seem to work (or I'm using the wrong search string here).
Oh, sorry, I was actually reproing this behavior with my example above, but I assumed that the diagnostic position would be underlined with a red squiggly in the Interactive Window. It was not, but it still appears in the Problems pane.
this also feels like it should be handled by jupyter extension?
this also feels like it should be handled by jupyter extension?
Yeah, if it still repros we should transfer it to them. Seems like this was missed in https://github.com/microsoft/vscode-jupyter/issues/8289 or a regression.
This issue still repros. Transferring to vscode-jupyter.
Jupyter: v2024.11.2024103001 (pre-release) Python: v2024.19.2024103001 (pre-release) Pylance: v2024.10.103 (pre-release) VS Code: 1.96.0-insider
Chatted with Don about this. The code that suppressed diagnostics in https://github.com/microsoft/vscode-jupyter/issues/8289 was in the jupyter-lsp-middleware
which we no longer use. Also, he felt that the decision of whether to suppress diagnostics in the IW should be handled per language. So:
ignore
config setting.I think it's fair to display diagnostics on the input box only, but not on executed blocks/cells as one can't go back to fix issues.
cc @cwebster-99
Environment data
2024.3.1 (pyright version 1.1.351, commit 87171fbf)
Windows 10 22H2 build 19045.4170
3.11.8, installed via conda
Basically https://github.com/microsoft/vscode-jupyter/issues/8289.
The last comment there indicated that if the issue still occurs it should be reported under the appropriate repository.