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.

Validating docstrings in Python files as RST

See original GitHub issue

As I understand it, rst-lint *.rst works great on plain text files using reStructuredText.

I would like to be able to do rst-lint *.py and have it pull out the Python docstrings, and check if they are valid reStructuredText.

Ideally any errors would retain the original line number from the Python file. That can probably be done via an offset if processing each docstring alone.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
peterjccommented, Jun 16, 2017

I’ve made the first release of the new plugin flake8-rst-docstrings on PyPI, which uses restructuredtext-lint internally:

https://pypi.python.org/pypi/flake8-rst-docstrings

(I’ll stop commenting on this issue now - thanks)

0reactions
peterjccommented, Jun 8, 2017

I’ve started working on this as a flake8 plugin under the name flake8-rst-docstrings,

https://github.com/peterjc/flake8-rst-docstrings

Read more comments on GitHub >

github_iconTop Results From Across the Web

flake8-rst-docstrings - PyPI
This is an MIT licensed flake8 plugin for validating Python docstrings markup as reStructuredText (RST) using the Python library docutils.
Read more >
Flake8 Plugin to Validate Python Docstrings As ... - Morioh
This is an MIT licensed flake8 plugin for validating Python docstrings markup as reStructuredText (RST) using the Python library docutils .
Read more >
doctest — Test interactive Python examples — Python 3.11.1 ...
There are several common ways to use doctest: To check that a module's docstrings are up-to-date by verifying that all interactive examples still...
Read more >
Documenting Python Code: A Complete Guide
Module docstrings are similar to class docstrings. Instead of classes and class methods being documented, it's now the module and any functions found...
Read more >
Advanced Code Documentation Beyond Comments and ...
This article is for you if you are working on Python projects — whether it is writing a Python ... Google, Numpy, and...
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