Closed
Description
I'm not 100% sure this is the right project to raise this, since the problem comes from interaction with python-lsp-ruff
and juptyerlab-lsp
. I only raised it here since the issue arose from a change in ruff.
Since 0.0.285, the jupyterlab-lsp plugin now gives the following diagnostic message:
SyntaxError: Expected a Jupyter Notebook (.ipynb), which must be internally stored as JSON, but found a Python source file: expected value at line 1 column 1
I believe this is because jupyterlab-lsp extracts the python code from the notebook cells, then python-lsp-ruff passes it to ruff via stdin, and specifies --stdin-filename
. Since #6628, this makes ruff expect ipynb JSON, rather than python code, which causes the error.