Skip to content

Commit a955989

Browse files
authored
CI make some more hooks manual (#50188)
make some more hooks manual Co-authored-by: MarcoGorelli <>
1 parent 627d1b6 commit a955989

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

.github/workflows/code-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
with:
4040
extra_args: --verbose --all-files
4141

42-
docstring_typing_pylint:
43-
name: Docstring validation, typing, and pylint
42+
docstring_typing_manual_hooks:
43+
name: Docstring validation, typing, and other manual pre-commit hooks
4444
runs-on: ubuntu-22.04
4545
defaults:
4646
run:

.pre-commit-config.yaml

+25-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
minimum_pre_commit_version: 2.15.0
22
exclude: ^LICENSES/|\.(html|csv|svg)$
3-
# reserve "manual" for mypy and pyright
4-
default_stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
3+
# reserve "manual" for relatively slow hooks which we still want to run in CI
4+
default_stages: [
5+
commit,
6+
merge-commit,
7+
push,
8+
prepare-commit-msg,
9+
commit-msg,
10+
post-checkout,
11+
post-commit,
12+
post-merge,
13+
post-rewrite
14+
]
515
ci:
616
autofix_prs: false
717
repos:
@@ -34,9 +44,11 @@ repos:
3444
- id: debug-statements
3545
- id: end-of-file-fixer
3646
exclude: \.txt$
37-
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
47+
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg,
48+
post-checkout, post-commit, post-merge, post-rewrite]
3849
- id: trailing-whitespace
39-
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite]
50+
stages: [commit, merge-commit, push, prepare-commit-msg, commit-msg,
51+
post-checkout, post-commit, post-merge, post-rewrite]
4052
- repo: https://github.com/cpplint/cpplint
4153
rev: 1.6.1
4254
hooks:
@@ -46,7 +58,13 @@ repos:
4658
# this particular codebase (e.g. src/headers, src/klib). However,
4759
# we can lint all header files since they aren't "generated" like C files are.
4860
exclude: ^pandas/_libs/src/(klib|headers)/
49-
args: [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
61+
args: [
62+
--quiet,
63+
'--extensions=c,h',
64+
'--headers=h',
65+
--recursive,
66+
'--filter=-readability/casting,-runtime/int,-build/include_subdir'
67+
]
5068
- repo: https://github.com/PyCQA/flake8
5169
rev: 6.0.0
5270
hooks:
@@ -107,6 +125,7 @@ repos:
107125
hooks:
108126
- id: yesqa
109127
additional_dependencies: *flake8_dependencies
128+
stages: [manual]
110129
- repo: local
111130
hooks:
112131
# NOTE: we make `black` a local hook because if it's installed from
@@ -214,7 +233,6 @@ repos:
214233
exclude: ^pandas/tests/extension/base/base\.py
215234
- id: pip-to-conda
216235
name: Generate pip dependency from conda
217-
description: This hook checks if the conda environment.yml and requirements-dev.txt are equal
218236
language: python
219237
entry: python scripts/generate_pip_deps_from_conda.py
220238
files: ^(environment.yml|requirements-dev.txt)$
@@ -311,6 +329,7 @@ repos:
311329
files: ^pandas
312330
exclude: ^(pandas/tests|pandas/_version.py|pandas/io/clipboard)
313331
language: python
332+
stages: [manual]
314333
additional_dependencies:
315334
- autotyping==22.9.0
316335
- libcst==0.4.7

0 commit comments

Comments
 (0)