5

lsp-mode complies to PEP8 style guide I guess, but how can I disable certain warnings, e.g. about missing docstrings etc.?

2 Answers 2

2

Use

(setq lsp-pyls-plugins-pycodestyle-enabled nil) 
1

There is no simple answer, since python-lsp-server aggregate warnings from different sources. Mainly pycodestyle/flake8 and pycodestyle.

The easiest will be to add a setup.cfg file which list the error you want to ignore. For example, for missing docs, simply add:

[pydocstyle] ignore = D100,D101,D102,D107 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.