Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5514660

Browse files
pratik-anuragByron
authored andcommitted
removed Unnecessary “else” after “return”
1 parent289fab8 commit5514660

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎git/compat.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,12 @@ def __str__(self):
145145
defu(text):
146146
ifPY3:
147147
returntext
148-
else:
149-
returntext.decode('unicode_escape')
148+
returntext.decode('unicode_escape')
150149

151150
defb(data):
152151
ifPY3:
153152
returndata.encode('latin1')
154-
else:
155-
returndata
153+
returndata
156154

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

288285
defdecodefilename(fn):
289286
returnfn.decode(FS_ENCODING,FS_ERRORS)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp