File: pre_commit.rst

package info (click to toggle)
pydocstyle 6.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 776 kB
  • sloc: python: 5,183; makefile: 162
file content (31 lines) | stat: -rw-r--r-- 925 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
**pydocstyle** can be included as a hook for `pre-commit`_.  The easiest way to get
started is to add this configuration to your ``.pre-commit-config.yaml``:

.. parsed-literal::

    -   repo: https://github.com/pycqa/pydocstyle
        rev: \ |version| \  # pick a git hash / tag to point to
        hooks:
        -   id: pydocstyle

See the `pre-commit docs`_ for how to customize this configuration.

Checked-in python files will be passed as positional arguments so no need to use ``--match=*.py``.
You can also use command line arguments instead of configuration files
to achieve the same effect with less files.

.. code-block:: yaml

    - id: pydocstyle
      args:
      - --ignore=D100,D203,D405
      # or multiline
      - |-
              --select=
              D101,
              D2

.. _pre-commit:
    https://pre-commit.com/
.. _pre-commit docs:
    https://pre-commit.com/#pre-commit-configyaml---hooks