Skip to content

This repository contains a Python utility tool for checking adherence to PEP 287 – reStructuredText (reST) Docstring Format. It validates function docstrings in Python files against the reST format.

License

Notifications You must be signed in to change notification settings

Casper321/reST-docstring-checker

Repository files navigation

reST-docstring-checker

This repository contains a Python utility tool for checking adherence to PEP 287 – reStructuredText (reST) Docstring Format. It validates docstrings in Python files against the reST format. It's a handy tool for developers seeking to maintain docstring readability and consistency with function headers.

Usage

repos:
  - repo: https://github.com/Casper321/reST-docstring-checker
    rev: v0.0.4
    hooks:
      - id: rest-docstring-checker
        additional_dependencies: [ "docstring-parser==0.16" ]

Setup

Requirements

Ensure you have the following installed:

  • Python 3.10 or later
  • Pip

Installation

  1. Install the project and its dependencies with Poetry:
make install

If you will be contributing to the project, install the development dependencies:

make install_dev

This includes additional tools like pre-commit that help to keep the codebase consistent.

Running the Tests

After installation, you can run the tests using:

make run_tests

This will run all the tests in the project using pytest.

Using Pre-commit

The project uses pre-commit to enforce a variety of community-agreed standards.

Run it with:

make run_pre_commit

This runs pre-commit on all the files in the project. It will also automatically fix some of the common issues, like whitespace, end of file settings etc. Make sure you add these changes to your commit.

About

This repository contains a Python utility tool for checking adherence to PEP 287 – reStructuredText (reST) Docstring Format. It validates function docstrings in Python files against the reST format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published