Skip to content

Commit 52241a7

Browse files
committed
BLD: fix linting check for .pyx
closes #14659
1 parent 1606153 commit 52241a7

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

ci/lint.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,24 @@ if [ "$LINT" ]; then
1010
# pandas/rpy is deprecated and will be removed.
1111
# pandas/src is C code, so no need to search there.
1212
echo "Linting *.py"
13-
flake8 pandas --filename '*.py' --exclude pandas/rpy,pandas/src
13+
flake8 pandas --filename=*.py --exclude pandas/rpy,pandas/src
14+
if [ $? -ne "0" ]; then
15+
RET=1
16+
fi
1417
echo "Linting *.py DONE"
1518

1619
echo "Linting *.pyx"
17-
flake8 pandas --filename '*.pyx' --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
20+
flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
21+
if [ $? -ne "0" ]; then
22+
RET=1
23+
fi
1824
echo "Linting *.pyx DONE"
1925

2026
echo "Linting *.pxi.in"
2127
for path in 'src'
2228
do
2329
echo "linting -> pandas/$path"
24-
flake8 pandas/$path --filename '*.pxi.in' --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
30+
flake8 pandas/$path --filename=*.pxi.in --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
2531
if [ $? -ne "0" ]; then
2632
RET=1
2733
fi

pandas/tslib.pyx

+4-2
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,8 @@ class Timestamp(_Timestamp):
688688
def validate(k, v):
689689
""" validate integers """
690690
if not isinstance(v, int):
691-
raise ValueError("value must be an integer, received {v} for {k}".format(v=type(v), k=k))
691+
raise ValueError("value must be an integer, received "
692+
"{v} for {k}".format(v=type(v), k=k))
692693
return v
693694

694695
for k, v in kwds.items():
@@ -5105,7 +5106,8 @@ cpdef normalize_date(object dt):
51055106
normalized : datetime.datetime or Timestamp
51065107
"""
51075108
if is_timestamp(dt):
5108-
return dt.replace(hour=0, minute=0, second=0, microsecond=0, nanosecond=0)
5109+
return dt.replace(hour=0, minute=0, second=0, microsecond=0,
5110+
nanosecond=0)
51095111
elif PyDateTime_Check(dt):
51105112
return dt.replace(hour=0, minute=0, second=0, microsecond=0)
51115113
elif PyDate_Check(dt):

0 commit comments

Comments
 (0)