We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 321c3b4 commit c412680Copy full SHA for c412680
gitdb/utils/encoding.py
@@ -1,18 +1,16 @@
1
from gitdb.utils import compat
2
3
if compat.PY3:
4
- string_types = (str, )
5
text_type = str
6
else:
7
- string_types = (basestring, )
8
text_type = unicode
9
10
11
def force_bytes(data, encoding="ascii"):
12
if isinstance(data, bytes):
13
return data
14
15
- if isinstance(data, string_types):
+ if isinstance(data, str):
16
return data.encode(encoding)
17
18
0 commit comments