-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
No linting support for jupyter notebook #319
Comments
Thank you for all the links! Unfortunately, I do not see anything in these resources describing VS Code changes or what their expectations are in this scenario. As you know, this extension currently filters out schemes like notebook cells on purpose. I'm not sure what I've seen in these links changes the underlying challenge of treating each little island as a standalone document. (For example, should each cell have its own top-level heading?) I think that's what this person is trying to capture when they suggest an entirely different linter be used for notebook cells: microsoft/vscode-pylint#20 (comment). i'm not sure the scenario is common enough to justify the effort/complexity that would require. |
Sorry, I went over this again, and what they actually suggest is that extensions using the template for VS Code python tools extensions, built on top of the pygls (Python language server) library, can now extract all code cells and treat them as a standalone document. This has already been implemented by the ruff VS Code extension, and other linter/formatter will (hopefully) follow suit. However, I now understand that it is probably too much effort and beyond the scope of |
Okay, thank you, I agree this feels out of scope for now. |
Hi,
I am aware of #199 and #174 "This is deliberate; Markdown snippets in Jupyter notebooks are not full-fledged documents and some of the linting rules don't make sense there".
However, there's been changes in how VSCode supports jupyter notebooks, see e.g. @karthiknadig in this comment
"The linting support will be handled by individual linter extensions, and not in the Jupyter Extension.
FYI, openlawlibrary/pygls#311 just merged last week. Once that is released we can begin the work to add this support in the linter extensions."
And @karthiknadig in further commenting on the issue above:
"The limitation is when we need to see notebook as a whole document. Like when using linting, we may have to provide a merged document to the linter containing only the python cell contents. Or in cases where the linter can handle notebook itself."
See also @rebornix in this comment:
"The notebook support is now stable in VS Code and extensions can adopt this already and add linting support. IIRC Ruff already works."
My point is, there used to exist a similar issue with linting Python cells in notebooks, but this seems to have been resolved. Maybe support for linting Markdown cells could thus also be brought back?
The text was updated successfully, but these errors were encountered: