Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docraise-0.1.0.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

docraise-0.1.0-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page