Skip to content

Commit cbe8bf5

Browse files
committed
BLD: fix linting check for .pyx
closes pandas-dev#14659
1 parent 1d6dbb4 commit cbe8bf5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

ci/lint.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ 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
1414
echo "Linting *.py DONE"
1515

1616
echo "Linting *.pyx"
17-
flake8 pandas --filename '*.pyx' --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
17+
flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
1818
echo "Linting *.pyx DONE"
1919

2020
echo "Linting *.pxi.in"
2121
for path in 'src'
2222
do
2323
echo "linting -> pandas/$path"
24-
flake8 pandas/$path --filename '*.pxi.in' --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
24+
flake8 pandas/$path --filename=*.pxi.in --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
2525
if [ $? -ne "0" ]; then
2626
RET=1
2727
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)