Skip to content

Commit 6f45304

Browse files
STY: add code check for use of builtin filter function (#36089)
1 parent c40bf02 commit 6f45304

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ci/code_checks.sh

+4
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
179179
invgrep -R --include="*.py" -E "super\(\w*, (self|cls)\)" pandas
180180
RET=$(($RET + $?)) ; echo $MSG "DONE"
181181

182+
MSG='Check for use of builtin filter function' ; echo $MSG
183+
invgrep -R --include="*.py" -P '(?<!def)[\(\s]filter\(' pandas
184+
RET=$(($RET + $?)) ; echo $MSG "DONE"
185+
182186
# Check for the following code in testing: `np.testing` and `np.array_equal`
183187
MSG='Check for invalid testing' ; echo $MSG
184188
invgrep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/

0 commit comments

Comments
 (0)