The library provides only one type insted of two string types in Python 2 when replacing types.StringTypes. This results in incorrect behavior after applying the library.
Description
if isinstance(inputValue, types.StringTypes) and isinstance(outputValue, types.StringTypes): # before
if isinstance(inputValue, (str,)) and isinstance(outputValue, (str,)): # after
Fixes: #
if isinstance(inputValue, six.string_types) and isinstance(outputValue, six.string_types):
Hello.
The library provides only one type insted of two string types in Python 2 when replacing types.StringTypes. This results in incorrect behavior after applying the library.
Description
Fixes: #
From the documentation: https://docs.python.org/2/library/types.html
From the six library code: https://github.com/benjaminp/six/blob/master/six.py
In Python2, basestring is the base class of str and unicode types.
And it does not work properly in Python2 after changing original code