Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topotato docstring linting #136

Open
wants to merge 3 commits into
base: topotato-base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .darglint2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[darglint2]
message_template={path}:{line} -> (in {obj}) {msg}
docstring_style=sphinx
strictness=short
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,20 @@ repos:
require_serial: true
pass_filenames: false
files: ^topotato/.*\.py$

- repo: https://github.com/jsh9/pydoclint # for classes
rev: 0.3.2
hooks:
- id: pydoclint
require_serial: true
args:
- --style=sphinx
files: ^topotato/.*\.py$

- repo: https://github.com/akaihola/darglint2 # for functions has it has no class validation for now
rev: v1.8.2
hooks:
- id: darglint2
args:
- -v2
files: ^topotato/.*\.py$