Skip to content

Docraise is a Python project that checks whether the docstrings in your Python code contain valid "Raises" sections.

Notifications You must be signed in to change notification settings

Laleee/docraise

Repository files navigation

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/

About

Docraise is a Python project that checks whether the docstrings in your Python code contain valid "Raises" sections.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages