From fd7bad7e17f3a712d6d098a82c6c450cde291eec Mon Sep 17 00:00:00 2001 From: Ben Nelson Date: Wed, 25 Jul 2018 16:50:03 -0600 Subject: [PATCH] fix blank spaces not being caught in *.pyx refs #21980 --- ci/lint.sh | 7 ++++++- pandas/_libs/tslibs/period.pyx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/lint.sh b/ci/lint.sh index 9bcee55e1344c3..f718cfd4f19d14 100755 --- a/ci/lint.sh +++ b/ci/lint.sh @@ -49,6 +49,11 @@ if [ "$LINT" ]; then if [ $? -ne "0" ]; then RET=1 fi + + if [[ -n $(find **/*.pyx -type f -exec egrep -l " +$" {} \;) ]] + then + RET=1 + fi echo "Linting *.pyx DONE" echo "Linting *.pxi.in" @@ -173,7 +178,7 @@ if [ "$LINT" ]; then RET=1 fi echo "Check for old-style classes DONE" - + echo "Check for backticks incorrectly rendering because of missing spaces" grep -R --include="*.rst" -E "[a-zA-Z0-9]\`\`?[a-zA-Z0-9]" doc/source/ diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index cd3ce5c1a8f091..9e3d6c3975c421 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -1538,7 +1538,7 @@ cdef class _Period(object): See Also -------- Period.year : Return the calendar year of the period. - + Examples -------- If the natural and fiscal year are the same, `qyear` and `year` will