-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
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
Ignoring *.ipynb files does not work #2135
Comments
This happens because pyright doesn't see the file as a "*.ipynb". The file is being preprocessed (to combine all of the cells) in the notebook by the VS Code Python extension, and the resulting combined file is then passed to pyright for analysis. The pylance team is actively working on changing the way this works. I'm going to transfer this bug to the pylance-release repo so it gets the attention it deserves. |
@erictraut - ah ok, that makes sense. Thanks for clarifying this and I'll be hoping for a fix in pylance. |
@judej we should discuss whether we should consider ipynb (opened in vscode) as something affected by pyrightconfig or mspythonconfig.json |
Still doesn't work with LSP notebooks because each cell is treated as its own file and those "fake" cell paths have additional data after the While waiting for a fix you could work around this issue by ignoring |
This issue has been fixed in version 2022.8.51, which we've just released. You can find the changelog here: CHANGELOG.md |
Describe the bug
Here is my
pyrightconfig.json
file:I confirmed that the
commands_archive.py
is ignored (as expected) by introducing an error in that file and noting that the error is not reported. However, the Jupyter notebooks in my project are not ignored and generate a large number of errors:To Reproduce
Using VS code, create a Jupyter notebook and include that
pyrightconfig.json
in the project.Expected behavior
No Pylance / pyright errors should be reported for any file named
*.ipynb
.VS Code extension or command-line
Running as a VS Code extension Pyright version v1.1.192.
The text was updated successfully, but these errors were encountered: