Linting in Jupyter ?

205 views
Skip to first unread message

CrestChristopher

unread,
Sep 29, 2019, 6:35:37 PM9/29/19
to Project Jupyter
Can you lint code in Jupyter or is needed ?

Christopher

Nicholas Bollweg

unread,
Sep 30, 2019, 7:59:44 PM9/30/19
to Project Jupyter
What language are you working in? For IPython, at least, there are already some linter integrations published. You can roll your own by implementing a magic.

Looking forward, there is some good stuff happening towards Language Server Protocol integration on jupyterlab-lsp, which will allow linting things that don't have kernels at all!




CrestChristopher

unread,
Sep 30, 2019, 8:10:22 PM9/30/19
to jup...@googlegroups.com

Oh yeah, let me do some reading :-)

On 9/30/2019 7:59 PM, Nicholas Bollweg wrote:
What language are you working in? For IPython, at least, there are already some linter integrations published. You can roll your own by implementing a magic.

Looking forward, there is some good stuff happening towards Language Server Protocol integration on jupyterlab-lsp, which will allow linting things that don't have kernels at all!




--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/c3c1ea8a-5c81-44d9-9781-9adc76b7c6ba%40googlegroups.com.

Pete Blois

unread,
Oct 1, 2019, 4:03:08 PM10/1/19
to jup...@googlegroups.com
Curious if there is any ongoing effort to adapt a Python LSP engine for IPython's syntax?

I haven't delved into all of the issues but it seems like something that could be beneficial and I'd be interested in helping out.

Michał Krassowski

unread,
Oct 1, 2019, 4:11:59 PM10/1/19
to jup...@googlegroups.com
Given that magics can be registered dynamically, the current approach for JupyterLab-LSP is to replace the magics using predefined, kernel specific regex, see https://github.com/krassowski/jupyterlab-lsp/blob/master/src/magics/defaults.ts

This also allows to lint bash in shell expressions and R in rpy2 cells created with cell magics.

Please also see the documentation/discussion in https://github.com/krassowski/jupyterlab-lsp/blob/master/examples/Magics_and_rpy2.ipynb - I would really want to hear your opinion on this approach.


Michał Krassowski

unread,
Oct 1, 2019, 4:17:53 PM10/1/19
to jup...@googlegroups.com
There is more discussion from me here: https://github.com/krassowski/jupyterlab-lsp/issues/3
Reply all
Reply to author
Forward
0 new messages