Skip to content

Commit

Permalink
Pre-Commit: pydocstyle
Browse files Browse the repository at this point in the history
Add [pydocstyle](https://github.com/PyCQA/pydocstyle) to
auto-format Function/Class docstrings according to numpy style.

Ref.:
- http://www.pydocstyle.org
- PyCQA/pydocstyle#603
  • Loading branch information
ax3l committed Apr 17, 2023
1 parent 359a322 commit c5881b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ repos:
# exclude: ^(docs/.*|tools/.*)$
# Alternatively: use autopep8?

# Docstring formatting according to numpy style
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies:
- tomli
# args:
# - --select=D101,D2
# - --ignore=D100,D203,D405

# Python Formatting
- repo: https://github.com/psf/black
rev: 23.3.0 # Keep in sync with blacken-docs
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[tool.pydocstyle]
convention = "numpy"
add-ignore = ["D100", "D104"]
#inherit = false
#match = .*\.py

0 comments on commit c5881b0

Please sign in to comment.