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.

Use pydocstyle and pylint to check docstring

See original GitHub issue

Subject of the feature

http://www.pydocstyle.org/en/stable/usage.html#command-line-interface

It is common to forget updating docstrings, so an automated tool can be helpful.

The docstring should also pass pylint docstring check.

Pylint Steps

I’ve updated the pylint config in the branch,

  1. Identify an error code, e.g. W9012
  2. Fix all related errors, then check with pylint --disable=all --enable=W9012 *

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
NMontanaBrowncommented, Dec 31, 2020

That’s why I was arguing for pylint all the way back then!

0reactions
mathpluscodecommented, Dec 30, 2020

It turns out that, google or reST, it doesn’t really matter, this pydocstyle can only do limited linting. It cannot detect missing docstring or wrong docstring for arguments.

BUT PYLINT can lol

Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage — pydocstyle 1.0.0 documentation
Error Check Options: Only one of --select, --ignore or --convention can be specified. If none is specified, defaults to `--convention=pep257`.
Read more >
How do I disable "missing docstring" warnings at a file-level in ...
Pylint doesn't currently let you discriminate between doc-string warnings. However, you can use Flake8 for all Python code checking along with the doc-string...
Read more >
Frequently Asked Questions - Pylint 2.16.0-dev documentation
By doing so arguments usage won't be checked. ... pydocstyle: missing-module-docstring, missing-class-docstring, missing-function-docstring.
Read more >
pydocstyle Documentation - Read the Docs
$ pydocstyle test.py test.py:18 in private nested class `meta`:. D101: Docstring missing test.py:27 in public function `get_user`:. D300: Use "" ...
Read more >
flake8-docstrings - PyPI
Extension for flake8 which uses pydocstyle to check docstrings. ... Or, adding docstring-convention=numpy to your flake8 configuration file.
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