question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to configure pyls?

See original GitHub issue

What I am trying to do…

… is to configure pyls (pycodestyle) to ignore some errors. If possible, I would like to disable pycodestyle completely and go only with pyflakes. (I use black as formatter, which produces a lot of “false positives” in pycodestyle)

How I would like to learn how to do it…

It would be great to see an example of a more extensive jupyter-lab configuration for jupyterlab-lsp. So far the only example I found is this generic “dummy”-snippet here:

{
  "LanguageServerManager": {
    "language_servers": {
      "a-language-server-implementation": {
        "argv": ["/absolute/path/to/a-language-server", "--stdio"],
        "languages": ["a-language"]
      }
    }
  }
}

I have found the necessary pyls configuration in this schema file, but I don’t know if/how this can be integrated/overwritten using jupyter labs extensions settings.

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
krassowskicommented, Jan 21, 2020

I think that switching to flake8 will require the configuration GUI, not sure if this can be achieved straightaway. I will try to expose some of the settings in the 0.8 release.

0reactions
RobertoMaurizzicommented, Jan 31, 2020

@dynobo from past experiences with pyls the best way to avoid running the checkers you want is to NOT install the others: when you install pyls, use pip install python-language-server instead of pip install python-language-server[all] then install only the checkers you need/want (i.e pip install rope pyls-black etc.). Right now you can probably pip uninstall pycodestyle and any other plugin you know it is doing extra checks or changes you don’t want.

Read more comments on GitHub >

github_iconTop Results From Across the Web

palantir/python-language-server: An implementation ... - GitHub
Change the pyls.configurationSources setting to ['flake8'] in order to respect flake8 configuration instead. Overall configuration is computed first from user ...
Read more >
Getting started with lsp-mode for Python - Matt Duck
You have two options for installing pyls and its dependencies: pip install python-language-server[all] . This will install pyls , and also ...
Read more >
python lsp setup - Waylon Walker
Setting up python with the native nvim>0.5 lsp was mr ... lua << EOF require'lspconfig'.pyright.setup{} EOF. pyls#190.
Read more >
pyls: Partial Least Squares in Python — pyls 0+untagged.269 ...
Currently, pyls works with Python 3.5+ and requires a few dependencies: ... git clone https://github.com/rmarkello/pyls.git cd pyls python setup.py install.
Read more >
Trying to Configure pyls through nvim-lspconfig - Stack Overflow
It says that I just need to add neovim/nvim-lspconfig to my plugins and then add lua require('lspconfig').pyls.setup{} to my init.vim .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found