docformatter icon indicating copy to clipboard operation
docformatter copied to clipboard

pre-commit hook usage is wrong in documentation

Open leoyala opened this issue 1 year ago • 0 comments

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.

leoyala avatar May 24 '24 14:05 leoyala