From cf61d5ddff6ebae4be875a3baf07369cbd2cee36 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Tue, 3 Jan 2023 10:20:00 +0000 Subject: [PATCH] chore(pre-commit): enable `pycodestyle` Signed-off-by: Xuehai Pan --- .pre-commit-config.yaml | 17 ++++++++++++++--- pyproject.toml | 4 ++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad7d1a0..1fbcec8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,17 +19,17 @@ repos: - id: debug-statements - id: double-quote-string-fixer - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.11.4 hooks: - id: isort stages: [commit, push, manual] - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black stages: [commit, push, manual] - repo: https://github.com/asottile/pyupgrade - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pyupgrade args: [--py36-plus] @@ -43,3 +43,14 @@ repos: types: [python] require_serial: true stages: [commit, push, manual] + - repo: https://github.com/pycqa/pydocstyle + rev: 6.2.1 + hooks: + - id: pydocstyle + additional_dependencies: [toml] + exclude: | + (?x)( + ^nvitop/gui/| + ^nvitop/callbacks/| + ^docs/ + ) diff --git a/pyproject.toml b/pyproject.toml index 7bcf722..ad72c0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,3 +82,7 @@ indent = 4 line_length = 100 lines_after_imports = 2 multi_line_output = 3 + +[tool.pydocstyle] +convention = "google" +match-dir = '^(?!(gui|callbacks|docs))[^\.].*'