def _validate_type_scalar ( self , value ) : if isinstance ( value , _int_types + ( _str_type , float , date , datetime , bool ) ) : return True
how to use type check validation in python
Is not a list or a dict
def _validate_type_scalar(self, value):
        """ Is not a list or a dict """
        if isinstance(
            value, _int_types + (_str_type, float, date, datetime, bool)
        ):
            return True