Skip to content

Commit a980ecc

Browse files
author
MomIsBestFriend
committed
CI: Unwanted patterns check
1 parent 5a7b5c9 commit a980ecc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ci/code_checks.sh

+8
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
207207
invgrep -R --include=*.{py,pyx} 'xrange' pandas
208208
RET=$(($RET + $?)) ; echo $MSG "DONE"
209209

210+
MSG='Check for use of ("%r" % foo) instead of {repr(foo)}' ; echo $MSG
211+
invgrep -R --include=*.{py,pyx} -E '\s%r' pandas | invgrep -v '%%r'
212+
RET=$(($RET + $?)) ; echo $MSG "DONE"
213+
214+
MSG='Check for use of {foo!r} instead of {repr(foo)}' ; echo $MSG
215+
invgrep -R --include=*.{py,pyx} '!r}' pandas
216+
RET=$(($RET + $?)) ; echo $MSG "DONE"
217+
210218
MSG='Check that no file in the repo contains trailing whitespaces' ; echo $MSG
211219
INVGREP_APPEND=" <- trailing whitespaces found"
212220
invgrep -RI --exclude=\*.{svg,c,cpp,html,js} --exclude-dir=env "\s$" *

0 commit comments

Comments
 (0)