Skip to content

Commit 61a5acd

Browse files
committed
fix camelCase. Move abs()
1 parent 21decd8 commit 61a5acd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

MySQLdb/times.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ def TimeDelta_or_None(s):
7171
else:
7272
ms = 0
7373
if h[0] == '-':
74-
isNegative = True
74+
negative = True
7575
else:
76-
isNegative = False
77-
h, m, s, ms = int(h), int(m), int(s), int(ms)
78-
td = timedelta(hours=abs(h), minutes=m, seconds=s,
76+
negative = False
77+
h, m, s, ms = abs(int(h)), int(m), int(s), int(ms)
78+
td = timedelta(hours=h, minutes=m, seconds=s,
7979
microseconds=ms)
80-
if isNegative:
80+
if negative:
8181
return -td
8282
else:
8383
return td

0 commit comments

Comments
 (0)