4

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

Drew
  • 75,699
  • 9
  • 109
  • 225
CD86
  • 543
  • 2
  • 9

2 Answers2

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