JupyterLab 3.0.14 How to disable code style highlights (pycodestyle)

Viewed 1658

I just installed WPy64-3940 that comes with JupyterLab 3.0.14 .
To my surprise, now my code comes decorated with things called "pycodestyle".
As you can see below, the code is underlined in orange and a popup can appear.
I do not like that at all, it perturbs my reading.
Would you know where this comes from and how I can disable this?

Thanks
Michel

enter image description here

1 Answers

This is not a built-in feature of JupyterLab, but an extension called jupyterlab-lsp. As one of the authors I am surprised to see it included by default on the WPy64 distribution, and sorry you don't like it. Here are three potential solutions:

  1. Ignore this specific diagnostic message (recommended). Right click to bring up context menu and select "Show diagnostics panel"; hover mouse over the row with diagnostic message that you do not like, right click, select "Ignore diagnostics like this".

bring up context menu and select "Show diagnostics panel"

hover mouse over the row with diagnostic message that you do not like, right click, select "Ignore diagnostics like this"

  1. Disable pycodestyle diagnostic provider completely in setting of the language server. Click on "Settings" menu (top menu bar) → "Advanced Settings Editor" and choose "Language Servers" tab. Copy paste the following settings ("pyls" is the old server, "pylsp" is the new one - only one is needed but I do not know which one you are using); you can also disable other sources of diagnostics for this language server here:
{
  "language_servers": {
    "pyls": {
      "serverSettings": {
        "pyls": {
          "plugins": {
            "pydocstyle": {
              "enabled": false
            },
            "pyflakes": {
              "enabled": true
            },
            "flake8": {
              "enabled": false
            }
          }
        },
        "pylsp": {
          "plugins": {
            "pydocstyle": {
              "enabled": false
            },
            "pyflakes": {
              "enabled": true
            },
            "flake8": {
              "enabled": false
            }
          }
        }
      }
    }
  }
}
  1. Disable all diagnostics by going to "Diagnostics" tab and adding a catch-all regular-expression rule like this:
{
    "ignoreMessagesPatterns": [".*"]
}

enter image description here

  1. Disable the LSP extension altogether. It is probably best to consult whoever creates WPy64-3940 on how to do this.
Related