Skip to content
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

Enable linters also on Jupyter notebooks #17713

Closed
antoniolanza1996 opened this issue Sep 3, 2021 · 13 comments
Closed

Enable linters also on Jupyter notebooks #17713

antoniolanza1996 opened this issue Sep 3, 2021 · 13 comments
Labels
area-linting feature-request Request for new features or functionality

Comments

@antoniolanza1996
Copy link

When we work with *.py files, we can select a Linter (e.g. flake8) and it will support us to be PEP8 complaint. Hence, I'm asking for the same functionality, but in the *.ipynb files.

Is there any chance this feature will be included in future releases?

@claudiaregio
Copy link

Thanks @antoniolanza1996, we will discuss where this lands on our roadmap during our next triage meeting

@rchiodo
Copy link

rchiodo commented Oct 13, 2021

This is really a python bug. The python extension would handle this.

@rchiodo rchiodo transferred this issue from microsoft/vscode-jupyter Oct 13, 2021
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 13, 2021
@karthiknadig karthiknadig added area-linting feature-request Request for new features or functionality needs community feedback Awaiting community feedback and removed triage-needed Needs assignment to the proper sub-team labels Oct 13, 2021
@karthiknadig
Copy link
Member

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 5 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@brettcannon brettcannon added needs proposal Need to make some design decisions and removed needs community feedback Awaiting community feedback labels Feb 3, 2022
@brettcannon
Copy link
Member

While this didn't meet our upvote threshold, LSP is looking at adding notebook support and thus we can look at supporting it when we redo linting support as separate extensions using LSP.

@MarthinusBosman
Copy link

MarthinusBosman commented Sep 8, 2022

Just want to mention, regarding upvote threshold, that I've personally been interested in this feature for more than a year, but it's REALLY difficult to track this issue, as it's floated around to so many places.

Really hope the LSP thing brings support for this, I'm sure a lot of people would like this, but just can't find it.

@karthiknadig
Copy link
Member

@MarthinusBosman The LSP specification 3.17 which adds the Notebook support was published recently. The Python LSP implementation that we depend on pygls (an external project) is working on updating to the LSP 3.17 spec. Once that is done, we can start enabling this in the tools specific extensions, like pylint here microsoft/vscode-pylint#20 and flake8 here microsoft/vscode-flake8#31

@MarthinusBosman
Copy link

@karthiknadig That's great news!

@c0m
Copy link

c0m commented Aug 11, 2023

There's a lot more interest in this today, going by the latest comments and upvotes on microsoft/vscode-jupyter#1231 in the last year alone.

For those interested who can't wait, there's a workaround that exists today to get pygls working with notebooks detailed in openlawlibrary/pygls#311 and an issue to track 3.17 progress (nearly there!) in openlawlibrary/pygls#346.

There's even more relevant discussion that can be found at openlawlibrary/pygls#356 and openlawlibrary/pygls#357.

@Sigmoidas
Copy link

It seems like Microsoft gave up on VS Code Jupyter Notebook Linting (as the microsoft/vscode-jupyter/issues/1231 has been closed?

@karthiknadig
Copy link
Member

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.

@dhruvmanila
Copy link

For reference, I've a working implementation for Ruff at astral-sh/ruff-lsp#264

@karthiknadig
Copy link
Member

karthiknadig commented Oct 12, 2023

@dhruvmanila I have left some minor comments. My plan is to do something similar in the linter extensions.

@karthiknadig
Copy link
Member

This is now tracked in linter specific extension repos:
pylint: microsoft/vscode-pylint#20
flake8: microsoft/vscode-flake8#31

@github-actions github-actions bot removed the needs proposal Need to make some design decisions label Oct 31, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

9 participants