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

Commit c412680

Browse files
Remove and replace encoding.string_types
1 parent 321c3b4 commit c412680

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎gitdb/utils/encoding.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
from gitdb.utils import compat
22

33
if compat.PY3:
4-
string_types = (str, )
54
text_type = str
65
else:
7-
string_types = (basestring, )
86
text_type = unicode
97

108

119
def force_bytes(data, encoding="ascii"):
1210
if isinstance(data, bytes):
1311
return data
1412

15-
if isinstance(data, string_types):
13+
if isinstance(data, str):
1614
return data.encode(encoding)
1715

1816
return data

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /