We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b17b65d commit 506afe6Copy full SHA for 506afe6
1 file changed
python-lib/rest_api_client.py
@@ -1,6 +1,5 @@
1
import requests
2
import time
3
-import sys
4
from pagination import Pagination
5
from safe_logger import SafeLogger
6
from loop_detector import LoopDetector
@@ -33,12 +32,9 @@ def format_template(template, **kwargs):
33
32
return formated
34
35
36
-def is_string(item):
37
- python_version = sys.version_info
38
- if python_version >= (3, 0, 0):
39
- return isinstance(item, str)
40
- else:
41
- return isinstance(item, str) or isinstance(item, unicode)
+def is_string(data):
+ data_type = type(data).__name__
+ return data_type in ["str", "unicode"]
42
43
44
class RestAPIClientError(ValueError):
0 commit comments