77import re
88import math
99
10- import six
11-
1210from splitio .api import APIException
1311from splitio .client .key import Key
1412from splitio .engine .evaluator import CONTROL
@@ -53,7 +51,7 @@ def _check_is_string(value, name, operation):
5351 :return: The result of validation
5452 :rtype: True|False
5553 """
56- if isinstance (value , six . string_types ) is False :
54+ if isinstance (value , str ) is False :
5755 _LOGGER .error (
5856 '%s: you passed an invalid %s, %s must be a non-empty string.' ,
5957 operation , name , name
@@ -121,7 +119,7 @@ def _check_can_convert(value, name, operation):
121119 :return: The result of validation
122120 :rtype: None|string
123121 """
124- if isinstance (value , six . string_types ):
122+ if isinstance (value , str ):
125123 return value
126124 else :
127125 # check whether if isnan and isinf are really necessary
@@ -173,7 +171,7 @@ def _check_valid_object_key(key, name, operation):
173171 '%s: you passed a null %s, %s must be a non-empty string.' ,
174172 operation , name , name )
175173 return None
176- if isinstance (key , six . string_types ):
174+ if isinstance (key , str ):
177175 if not _check_string_not_empty (key , name , operation ):
178176 return None
179177 key_str = _check_can_convert (key , name , operation )
@@ -515,8 +513,8 @@ def valid_properties(properties):
515513
516514 valid_properties = dict ()
517515
518- for property , element in six . iteritems ( properties ):
519- if not isinstance (property , six . string_types ): # Exclude property if is not string
516+ for property , element in properties . items ( ):
517+ if not isinstance (property , str ): # Exclude property if is not string
520518 continue
521519
522520 valid_properties [property ] = None
@@ -525,14 +523,14 @@ def valid_properties(properties):
525523 if element is None :
526524 continue
527525
528- if not isinstance (element , six . string_types ) and not isinstance (element , Number ) \
526+ if not isinstance (element , str ) and not isinstance (element , Number ) \
529527 and not isinstance (element , bool ):
530528 _LOGGER .warning ('Property %s is of invalid type. Setting value to None' , element )
531529 element = None
532530
533531 valid_properties [property ] = element
534532
535- if isinstance (element , six . string_types ):
533+ if isinstance (element , str ):
536534 size += len (element )
537535
538536 if size > MAX_PROPERTIES_LENGTH_BYTES :
0 commit comments