Skip to content

Commit eaf19fb

Browse files
committed
[CI] Revert pydoclint baseline workaround
Remove the dual local/CI hook configuration for pydoclint and simplify back to a single hook. The workaround was needed due to a bug, but this is now fixed in pydoclint 0.8.3. - Upgrade pydoclint from 0.8.1 to 0.8.3 - Remove separate pydoclint-local and pydoclint-ci hooks - Simplify CI lint script to use standard pre-commit run Signed-off-by: Thomas Desrosiers <thomas@anyscale.com>
1 parent 53328c2 commit eaf19fb

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,38 +42,10 @@ repos:
4242
- id: ruff
4343
args: [ --select, "I", --fix, --exit-non-zero-on-fix ]
4444

45-
# pydoclint-local is for local commits only due to pre-commit-hook only passing
46-
# updated files to the hook and overwriting the baseline text file
4745
- repo: https://github.com/jsh9/pydoclint
48-
rev: "0.8.1"
46+
rev: "0.8.3"
4947
hooks:
5048
- id: pydoclint
51-
name: pydoclint-local
52-
stages: [pre-commit, pre-push]
53-
args: [
54-
--style=google,
55-
--baseline=ci/lint/pydoclint-baseline.txt,
56-
--exclude=thirdparty|^python/ray/serve/tests/test_config_files/syntax_error\.py$|^python/ray/_private/parameter\.py$,
57-
--auto-regenerate-baseline=False,
58-
# Current settings (not because we think they're right, but because we
59-
# don't want a baseline the size of the codebase)
60-
--arg-type-hints-in-docstring=False,
61-
--skip-checking-raises=True,
62-
--check-return-types=False,
63-
--allow-init-docstring=True,
64-
--check-class-attributes=False,
65-
# --check-style-mismatch=True, # Bring this back once things are a bit cleaner
66-
]
67-
types: [python]
68-
files: '^python/ray/'
69-
70-
# pydoclint-ci is for CI, overwrites the baseline text file, and is run with the manual stage flag
71-
- repo: https://github.com/jsh9/pydoclint
72-
rev: "0.8.1"
73-
hooks:
74-
- id: pydoclint
75-
name: pydoclint-ci
76-
stages: [manual]
7749
args: [
7850
--style=google,
7951
--baseline=ci/lint/pydoclint-baseline.txt,

ci/lint/lint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ pre_commit() {
4949
pre_commit_pydoclint() {
5050
# Run pre-commit pydoclint on all files
5151
pip install -c python/requirements_compiled.txt pre-commit clang-format
52-
pre-commit run pydoclint --hook-stage manual --all-files --show-diff-on-failure
53-
git diff --quiet -- ci/lint/pydoclint-baseline.txt || {
54-
echo "Baseline needs update. Run the CI-style hook: \"pre-commit run pydoclint --hook-stage manual --all-files --show-diff-on-failure\" locally and commit the baseline."
55-
exit 1
56-
}
52+
pre-commit run pydoclint --all-files --show-diff-on-failure
5753
}
5854

5955
code_format() {

0 commit comments

Comments
 (0)