This document shows you how to configure pydoclint.
For detailed explanations of all options, please read this page: Configuration options of pydoclint.
In either your terminal window or your CI/CD file (such as tox.ini
):
Native pydoclint:
pydoclint --check-arg-order=False <FILE_OR_FOLDER_PATH>
Via Flake8:
flake8 --check-arg-order=False <FILE_OR_FOLDER_PATH>
(Note: the =
sign is not necessary but it is encouraged, because it’s just a
bit more “Pythonic” and easier to read.)
Native:
In a .toml
file somewhere in your project folder, add a section like this
(put in the config that you need):
[tool.pydoclint]
style = 'google'
exclude = '\.git|\.tox|tests/data|some_script\.py'
require-return-section-when-returning-nothing = true
Then, specify the path of the .toml
file in your command:
pydoclint --config=path/to/my/config.toml <FILE_OR_FOLDER_PATH>
Note: the default value for --config
option is pyproject.toml
(in the
root directory of your project) if you do not specify the config file name.
Flake8:
[flake8]
.pre-commit-config.yaml
This is a template for .pre-commit-config.yaml
:
As a native tool | As a flake8 plugin | ||||||||
---|---|---|---|---|---|---|---|---|---|
```yaml
- repo: https://github.com/jsh9/pydoclint
rev:
```yaml
- repo: https://github.com/pycqa/flake8
rev: |
|