diff --git a/.darglint2 b/.darglint2 new file mode 100644 index 000000000000..4a1e00a7ca3b --- /dev/null +++ b/.darglint2 @@ -0,0 +1,4 @@ +[darglint2] +message_template={path}:{line} -> (in {obj}) {msg} +docstring_style=sphinx +strictness=short diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f9ba4e2bdf9..292fbf1c8623 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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$