Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 61a5acd

Browse filesBrowse files
committed
fix camelCase. Move abs()
1 parent 21decd8 commit 61a5acd
Copy full SHA for 61a5acd

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎MySQLdb/times.py

Copy file name to clipboardExpand all lines: MySQLdb/times.py
+5-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.