You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the pygrep hooks have the "or" | symbol at the end of the line, which makes diffs longer than necessary and can cause bugs. It would be better to put that symbol at the beginning of the line.
For example, instead of
- id: non-standard-numpy.random-related-imports
name: Check for non-standard numpy.random-related imports excluding pandas/_testing.py
language: pygrep
exclude: pandas/_testing.py
entry: |
(?x)
# Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
from\ numpy\ import\ random|
from\ numpy.random\ import
it should be
- id: non-standard-numpy.random-related-imports
name: Check for non-standard numpy.random-related imports excluding pandas/_testing.py
language: pygrep
exclude: pandas/_testing.py
entry: |
(?x)
# Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
from\ numpy\ import\ random
|from\ numpy.random\ import
There's even an | symbol missing in the non-standard-imports-in-tests, which should be fixed (having the symbol at the beginning of the line would probably have made this easier to spot)
The file that needs changing is .pre-commit-config.yaml
The text was updated successfully, but these errors were encountered:
Currently, the pygrep hooks have the "or"
|
symbol at the end of the line, which makes diffs longer than necessary and can cause bugs. It would be better to put that symbol at the beginning of the line.For example, instead of
it should be
There's even an
|
symbol missing in thenon-standard-imports-in-tests
, which should be fixed (having the symbol at the beginning of the line would probably have made this easier to spot)The file that needs changing is
.pre-commit-config.yaml
The text was updated successfully, but these errors were encountered: