From d263893d4abeb0f3016f58aef0118ead7ebf4ffd Mon Sep 17 00:00:00 2001 From: danibene <34680344+danibene@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:32:32 -0400 Subject: [PATCH 1/2] add docstring check in precommit --- .pre-commit-config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8950e61..ab11542 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,8 +56,7 @@ repos: rev: 7.0.0 hooks: - id: flake8 - ## You can add flake8 plugins via `additional_dependencies`: - # additional_dependencies: [flake8-bugbear] + additional_dependencies: [flake8-docstrings] ## Check for misspells in documentation files: # - repo: https://github.com/codespell-project/codespell From e48995b6df1aa6987f12178aacccbc239e47ca45 Mon Sep 17 00:00:00 2001 From: danibene <34680344+danibene@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:32:51 -0400 Subject: [PATCH 2/2] have flake8 ignore certain docstring errors --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 7f72280..8bc4520 100644 --- a/setup.cfg +++ b/setup.cfg @@ -95,7 +95,7 @@ formats = bdist_wheel [flake8] # Some sane defaults for the code style checker flake8 max_line_length = 130 -extend_ignore = E203, W503, E401, E501, E741, E266 +extend_ignore = E203, W503, E401, E501, E741, E266, D100, D107, D400, D401 # ^ Black-compatible # E203 and W503 have edge cases handled by black exclude =