@@ -1061,7 +1061,7 @@ def _verify_name(name):
10611061 TypeError: If the ``name`` is not a string.
10621062 ValueError: If the name contains a ``.``.
10631063 """
1064- if not isinstance (name , str ):
1064+ if not isinstance (name , six . string_types ):
10651065 raise TypeError ("Name {!r} is not a string" .format (name ))
10661066
10671067 if "." in name :
@@ -2334,7 +2334,7 @@ def _validate(self, value):
23342334 .BadValueError: If ``value`` is not a :class:`float` or convertible
23352335 to one.
23362336 """
2337- if not isinstance (value , (float , int )):
2337+ if not isinstance (value , six . integer_types + (float ,)):
23382338 raise exceptions .BadValueError (
23392339 "Expected float, got {!r}" .format (value )
23402340 )
@@ -4871,7 +4871,7 @@ def _fix_up_properties(cls):
48714871 an underscore.
48724872 """
48734873 kind = cls ._get_kind ()
4874- if not isinstance (kind , str ):
4874+ if not isinstance (kind , six . string_types ):
48754875 raise KindError (
48764876 "Class {} defines a ``_get_kind()`` method that returns "
48774877 "a non-string ({!r})" .format (cls .__name__ , kind )
@@ -5653,7 +5653,7 @@ def _get_or_insert_async(
56535653 tasklets.Future: Model: The entity that was either just retrieved
56545654 or created.
56555655 """
5656- if not isinstance (name , str ):
5656+ if not isinstance (name , six . string_types ):
56575657 raise TypeError (
56585658 "'name' must be a string; received {!r}" .format (name )
56595659 )
0 commit comments