pydocstyle's default --match option should be honored
See original GitHub issueWhat’s the output of :CocCommand pyright.version
[coc.nvim] coc-pyright 1.1.141 with Pyright 1.1.142
By default pydocstyle does not check file names starting with test_
for docstrings. Running pydocstyle
from shell confirms this. However, I still see missing docstring warnings while working on my test files. I could disable linting altogether for test files, or disable pydocstyle while writing tests, but both are inconvenient. Ideally, there should be a way to specify arguments passed to there is.pydocstyle
Is this an issue with the upstream, or can this be handled within coc-pyright?
edit: Appearently, there is an option for that: "python.linting.pydocstyleArgs": [ "--match='(?!test_).*\\.py" ]
(notice the double \ because coc complained about invalid escape character.) Should this option have a default value that reflects that of the standalone pydocstyle
?
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (15 by maintainers)
Top GitHub Comments
Check filename with
^test_.*\.py$
, return empty when matched. This is a hack fix, I think pydocstyle should fix it.The key problem is
pydocstyle lib
will ignoretest_m.py
by default, butpydocstyle lib/test_m.py
will run it.