summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPratik Anurag <panurag247365@gmail.com>2019-10-15 19:48:47 +0530
committerSebastian Thiel <sebastian.thiel@icloud.com>2019-10-15 18:47:24 +0200
commit55146609e2d0b120c5417714a183b3b0b625ea80 (patch)
treefb619e9429b681afa9fba3405a1f7ed8fe70a2d6
parent289fab8c6bc914248f03394672d650180cf39612 (diff)
downloadgitpython-55146609e2d0b120c5417714a183b3b0b625ea80.tar.gz
removed Unnecessary “else” after “return”
-rw-r--r--git/compat.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/git/compat.py b/git/compat.py
index 02dc69de..e88ca9b5 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -145,14 +145,12 @@ FS_ERRORS = 'surrogateescape'
def u(text):
if PY3:
return text
- else:
- return text.decode('unicode_escape')
+ return text.decode('unicode_escape')
def b(data):
if PY3:
return data.encode('latin1')
- else:
- return data
+ return data
if PY3:
_unichr = chr
@@ -282,8 +280,7 @@ def encodefilename(fn):
ch_utf8 = ch.encode('utf-8')
encoded.append(ch_utf8)
return bytes().join(encoded)
- else:
- return fn.encode(FS_ENCODING, FS_ERRORS)
+ return fn.encode(FS_ENCODING, FS_ERRORS)
def decodefilename(fn):
return fn.decode(FS_ENCODING, FS_ERRORS)