Skip to content

Commit 5643161

Browse files
committed
Make flake8 pass on python3
1 parent ce592ed commit 5643161

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

abe/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
_PY3 = sys.version_info >= (3, 0)
55

6+
if _PY3:
7+
unicode = str
8+
69

710
def datetime_to_string(value):
811
representation = value.isoformat()
@@ -22,7 +25,6 @@ def to_unicode(data):
2225
else:
2326
data = str(data)
2427

25-
if not _PY3:
26-
if isinstance(data, str):
27-
data = unicode(data)
28+
if not _PY3 and isinstance(data, str):
29+
data = unicode(data)
2830
return data

0 commit comments

Comments
 (0)