PyCQA / docformatter

Formats docstrings to follow PEP 257
https://pypi.python.org/pypi/docformatter
MIT License
524 stars 61 forks source link

pre-commit hook usage is wrong in documentation #281

Open leoyala opened 1 month ago

leoyala commented 1 month ago

Hello,

I started using docformatter as a pre-commit hook, and noticed that the description on how to use it is wrong in the documentation. In the webpage, it is indicated that the usage is:

- repo: https://github.com/PyCQA/docformatter
  rev: v1.7.5
  hooks:
    - id: docformatter
      additional_dependencies: [tomli]
      args: [--in-place --config ./pyproject.toml]

However, using it like this leads to pre-commit ignoring the arguments. To fix this, I had to separate each argument in the list and surround it with quotes, like this:

- repo: https://github.com/PyCQA/docformatter
  rev: v1.7.5
  hooks:
    - id: docformatter
      additional_dependencies: [tomli]
      args: ["--in-place", "--config=./pyproject.toml"]

It would be good to update the documentation.

P.S.: I am using WSL with Ubuntu 22.04 and version v.7.5 of docformatter.