Installation

There are multiple options to install g-docformatter:

Pre-commit

The package may be used as a pre-commit hook (recommended):

Add the following to your .pre-commit-config.yaml:

.pre-commit-config.yaml
  - hooks:
    - id: google_docformatter
    repo: https://gitea.digital-architects.net/Repo-Tools/g-docformatter
    rev: <version>  # Substitute <version> with the desired tag or commit hash

Warning

This tool is intended to be ran after the docformatter pre-commit hook. Make sure to add the docformatter hook to your .pre-commit-config.yaml file before this one. Failure to do this may cause docstring text to be deleted.

Poetry

The package may be used as a development dependency:

poetry add g-docformatter --group dev