Skip to content

Commit 0b207a8

Browse files
author
MomIsBestFriend
committed
CI: Unwanted patterns check
1 parent 835f207 commit 0b207a8

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
@@ -203,6 +203,14 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
203203
invgrep -R --include=*.{py,pyx} '\.__class__' pandas
204204
RET=$(($RET + $?)) ; echo $MSG "DONE"
205205

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

0 commit comments

Comments
 (0)