Skip to content

Commit 48f3531

Browse files
author
MomIsBestFriend
committed
CI: Unwanted patterns check
1 parent 1593023 commit 48f3531

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
@@ -212,6 +212,14 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
212212
invgrep -R --include=*.{py,pyx} 'xrange' pandas
213213
RET=$(($RET + $?)) ; echo $MSG "DONE"
214214

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

0 commit comments

Comments
 (0)