Skip to content

Commit 7e4d331

Browse files
CLN: consistently put '|' at start of line in pygrep hooks #39301 (#39304)
1 parent 86e07f2 commit 7e4d331

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

.pre-commit-config.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ repos:
6060
entry: |
6161
(?x)
6262
# Check for imports from pandas.core.common instead of `import pandas.core.common as com`
63-
from\ pandas\.core\.common\ import|
64-
from\ pandas\.core\ import\ common|
63+
from\ pandas\.core\.common\ import
64+
|from\ pandas\.core\ import\ common
6565
6666
# Check for imports from collections.abc instead of `from collections import abc`
67-
from\ collections\.abc\ import
67+
|from\ collections\.abc\ import
6868
6969
- id: non-standard-numpy.random-related-imports
7070
name: Check for non-standard numpy.random-related imports excluding pandas/_testing.py
@@ -73,24 +73,24 @@ repos:
7373
entry: |
7474
(?x)
7575
# Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
76-
from\ numpy\ import\ random|
77-
from\ numpy.random\ import
76+
from\ numpy\ import\ random
77+
|from\ numpy.random\ import
7878
types: [python]
7979
- id: non-standard-imports-in-tests
8080
name: Check for non-standard imports in test suite
8181
language: pygrep
8282
entry: |
8383
(?x)
8484
# Check for imports from pandas._testing instead of `import pandas._testing as tm`
85-
from\ pandas\._testing\ import|
86-
from\ pandas\ import\ _testing\ as\ tm|
85+
from\ pandas\._testing\ import
86+
|from\ pandas\ import\ _testing\ as\ tm
8787
8888
# No direct imports from conftest
89-
conftest\ import|
90-
import\ conftest
89+
|conftest\ import
90+
|import\ conftest
9191
9292
# Check for use of pandas.testing instead of tm
93-
pd\.testing\.
93+
|pd\.testing\.
9494
types: [python]
9595
files: ^pandas/tests/
9696
- id: incorrect-code-directives
@@ -148,9 +148,9 @@ repos:
148148
name: Check for outdated annotation syntax and missing error codes
149149
entry: |
150150
(?x)
151-
\#\ type:\ (?!ignore)|
152-
\#\ type:\s?ignore(?!\[)|
153-
\)\ ->\ \"
151+
\#\ type:\ (?!ignore)
152+
|\#\ type:\s?ignore(?!\[)
153+
|\)\ ->\ \"
154154
language: pygrep
155155
types: [python]
156156
- id: np-bool
@@ -166,9 +166,9 @@ repos:
166166
files: ^pandas/tests/
167167
exclude: |
168168
(?x)^
169-
pandas/tests/io/excel/test_writers\.py|
170-
pandas/tests/io/pytables/common\.py|
171-
pandas/tests/io/pytables/test_store\.py$
169+
pandas/tests/io/excel/test_writers\.py
170+
|pandas/tests/io/pytables/common\.py
171+
|pandas/tests/io/pytables/test_store\.py$
172172
- repo: https://github.com/asottile/yesqa
173173
rev: v1.2.2
174174
hooks:

0 commit comments

Comments
 (0)