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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file docraise-0.1.0.tar.gz.

File metadata

  • Download URL: docraise-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for docraise-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2a2bf379b79756c11da1688cd4595cb7675321e4084e4dab768505a59f03cbb
MD5 9ee2ad598c327a9f21c0976d31c49e42
BLAKE2b-256 fafb4e5dfa21cd4bbd83c4e251d39035d87fb697c081a3ed00fbf759dff44f40

See more details on using hashes here.

File details

Details for the file docraise-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docraise-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for docraise-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0731cc9f9a0e21ff91630311ff5fa9639aca34be55df62b0bb2e392d519c6036
MD5 8c359e73586460ec19cc56ac86a86223
BLAKE2b-256 65542081f59d2f301b9ba29d6c8074a9a35b58aa19a208d440a5c5d147ba1770

See more details on using hashes here.

Supported by

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