Docraise is a linter that checks whether the docstrings contain valid "Raises" sections
Project description
Docraise
Docraise is a Python project that checks whether the docstrings in your Python code contain valid "Raises" sections. It ensures that every exception your code raises is documented in the docstrings, and vice versa - that every exception documented in the docstrings is actually raised by the code.
Installation
Install the project dependencies:
pip install -r requirements-dev.txt
pre-commit setup
Docraise uses pre-commit to manage git hooks. This helps to ensure that code style, tests, and other checks are run before each commit.
We use the following pre-commit plugins:
- black: Ensures our Python code adheres to the Black code style.
- flake8: Lints our Python code to catch potential bugs.
- isort: Sorts our Python imports.
- mypy: Checks our Python code for type errors.
- pydocstyle: Checks our Python docstrings to ensure they adhere to the docstring conventions.
- conventional commit: Ensures all commit messages adhere to the Conventional Commits style.
In the project directory, install the pre-commit hooks:
pre-commit install
pre-commit install --hook-type commit-msg
Usage
TODO
Testing
TODO
pytest tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.