Skip to content

Commit e1dee07

Browse files
committed
UPD: check for numpy.random-related imports
1 parent 9cb3723 commit e1dee07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ci/code_checks.sh

+5
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
197197
invgrep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/
198198
RET=$(($RET + $?)) ; echo $MSG "DONE"
199199

200+
# GH37053, Check for np.random.<method> instead of `from numpy.random import` or `from numpy import random`
201+
MSG='Check for numpy.random-related imports' ; echo $MSG
202+
invgrep -R --include="*.py" -E "(from numpy.random import)|(from numpy import random)" pandas
203+
RET=$(($RET + $?)) ; echo $MSG "DONE"
204+
200205
# Check for the following code in the extension array base tests: `tm.assert_frame_equal` and `tm.assert_series_equal`
201206
MSG='Check for invalid EA testing' ; echo $MSG
202207
invgrep -r -E --include '*.py' --exclude base.py 'tm.assert_(series|frame)_equal' pandas/tests/extension/base

0 commit comments

Comments
 (0)