diff options
author | Pratik Anurag <panurag247365@gmail.com> | 2019-10-15 19:48:47 +0530 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2019-10-15 18:47:24 +0200 |
commit | 55146609e2d0b120c5417714a183b3b0b625ea80 (patch) | |
tree | fb619e9429b681afa9fba3405a1f7ed8fe70a2d6 /git/compat.py | |
parent | 289fab8c6bc914248f03394672d650180cf39612 (diff) | |
download | gitpython-55146609e2d0b120c5417714a183b3b0b625ea80.tar.gz |
removed Unnecessary “else” after “return”
Diffstat (limited to 'git/compat.py')
-rw-r--r-- | git/compat.py | 9 |
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) |