Skip to content

Commit 41bb792

Browse files
committed
fixed flake8 with py3
1 parent 1b8486d commit 41bb792

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

progressbar/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ def format_time(tval, precision=datetime.timedelta(seconds=1)):
386386

387387
if isinstance(tval, six.string_types + six.integer_types + (float, )):
388388
try:
389-
tval = datetime.timedelta(seconds=(long(tval) if six.PY2
390-
else int(tval)))
389+
castfunc = long if six.PY2 else int # NOQA
390+
tval = datetime.timedelta(seconds=castfunc(tval))
391391
except OverflowError: # pragma: no cover
392392
tval = None
393393

0 commit comments

Comments
 (0)