4

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)
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.