Skip to content

Commit

Permalink
Fix attrs incompatibility of pydoclint
Browse files Browse the repository at this point in the history
* Pin pydoclint to version 0.5.1 (now also in pre-commit)
* Deactivate incompatible `check-class-attributes` option

For details, see: jsh9/pydoclint#140
  • Loading branch information
AdrianSosic committed Jun 26, 2024
1 parent e79f37f commit 9b242c6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [pydoclint]
additional_dependencies: [pydoclint==0.5.1]
args: [--select=DOC, --config=pydoclint.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
Expand Down
17 changes: 12 additions & 5 deletions pydoclint.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# The following are options that are used for pydoclint
# Note that we need to use pydoclint as a flake8 plugin as we cannot have the
# in-line noqa exclusions otherwise

[flake8]
# Use google docstring style
style=google
# We do not have the type hints in the docstrings
arg-type-hints-in-docstring=False
# We do not have the return types in the docstrings
check-return-types=False
style=google

# We do not repeat parameter type hints in docstrings
arg-type-hints-in-docstring=False

# We do not repeat return types in the docstrings
check-return-types=False

# As of 0.5.2, pydoclint breaks with attrs classes
# https://github.com/jsh9/pydoclint/issues/140
check-class-attributes=False
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ examples = [
lint = [
"flake8==7.0.0", # see DEV TOOLS NOTE
"pre-commit==2.19.0", # see DEV TOOLS NOTE
"pydoclint==0.2.1", # see DEV TOOLS NOTE
"pydoclint==0.5.1", # see DEV TOOLS NOTE
"ruff==0.1.6", # see DEV TOOLS NOTE
"typos==1.16.23" # see DEV TOOLS NOTE
]
Expand Down

0 comments on commit 9b242c6

Please sign in to comment.