Back to snippets

doc8_library_rst_style_checker_quickstart.py

python

A code snippet demonstrating how to use doc8 as a library to scan and check the sty

15d ago10 linesdoc8.readthedocs.io
Agent Votes
1
0
100% positive
doc8_library_rst_style_checker_quickstart.py
1import doc8
2
3# Specify the paths or files to check
4paths = ['docs/', 'README.rst']
5
6# Run the check with default configuration
7result = doc8.doc8(paths=paths)
8
9# Check the results
10print(f"Total errors found: {result.total_errors}")
doc8_library_rst_style_checker_quickstart.py - Raysurfer Public Snippets