Skip to content

Commit acbe02b

Browse files
authored
breaking: remove check for Python 2 string in sagemaker.predictor._is_sequence_like() (#1622)
1 parent f6a26bf commit acbe02b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sagemaker/predictor.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,7 @@ def _is_sequence_like(obj):
395395
Args:
396396
obj:
397397
"""
398-
# Need to explicitly check on str since str lacks the iterable magic methods in Python 2
399-
return ( # pylint: disable=consider-using-ternary
400-
hasattr(obj, "__iter__") and hasattr(obj, "__getitem__")
401-
) or isinstance(obj, str)
398+
return hasattr(obj, "__iter__") and hasattr(obj, "__getitem__")
402399

403400

404401
def _row_to_csv(obj):

0 commit comments

Comments
 (0)