Skip to content

Commit 5514660

Browse files
pratik-anuragByron
authored andcommitted
removed Unnecessary “else” after “return”
1 parent 289fab8 commit 5514660

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎git/compat.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,12 @@ def __str__(self):
145145
def u(text):
146146
if PY3:
147147
return text
148-
else:
149-
return text.decode('unicode_escape')
148+
return text.decode('unicode_escape')
150149

151150
def b(data):
152151
if PY3:
153152
return data.encode('latin1')
154-
else:
155-
return data
153+
return data
156154

157155
if PY3:
158156
_unichr = chr
@@ -282,8 +280,7 @@ def encodefilename(fn):
282280
ch_utf8 = ch.encode('utf-8')
283281
encoded.append(ch_utf8)
284282
return bytes().join(encoded)
285-
else:
286-
return fn.encode(FS_ENCODING, FS_ERRORS)
283+
return fn.encode(FS_ENCODING, FS_ERRORS)
287284

288285
def decodefilename(fn):
289286
return fn.decode(FS_ENCODING, FS_ERRORS)

0 commit comments

Comments
 (0)