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.

pydocstyle's default --match option should be honored

See original GitHub issue

What’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 pydocstyle there is.

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:closed
  • Created 2 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
fannheywardcommented, May 25, 2021

Check filename with ^test_.*\.py$, return empty when matched. This is a hack fix, I think pydocstyle should fix it.

1reaction
fannheywardcommented, May 25, 2021

The key problem is pydocstyle lib will ignore test_m.py by default, but pydocstyle lib/test_m.py will run it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage — pydocstyle 6.1.1 documentation
Note: When using --match, --match-dir or --ignore-decorators consider whether you should use a single quote (') or a double quote ("), depending on...
Read more >
pyproject.toml - MKDocs Template - GitLab du LIRIS
Template to easily setup and managed mkdocs documentation in folder to have homogenous documentation. This repo hosts mkdocs configuration ...
Read more >
pydocstyle Documentation - manpages.ubuntu!
Error Check Options: Only one of --select, --ignore or --convention can be specified. If none is specified, defaults to `--convention=pep257`.
Read more >
pycodestyle command man page - ManKier
You can also make pycodestyle.py show the source code for each error, ... note that if the option --ignore=errors is used, the default...
Read more >
tidypy/tidypy - Docker Image | Docker Hub
tidypy default-config --help Usage: tidypy default-config [OPTIONS] Outputs a ... and pydocstyle do not respect this option and will always honor any #...
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