예제 #1
0
 def __normalize_rhs(self, rhs: ValueType) -> ValueType:
     if is_string(rhs):
         return _parse_iso_date(rhs) or rhs
     return self.__normalize_value(rhs)
예제 #2
0
 def _needs_casting(self, value, function_type=None):
     return is_string(value)
예제 #3
0
 def accepts_rhs(cls, value):
     return is_datetime(value) or is_string(value)
예제 #4
0
 def _accepts_lhs(self, lhs, function_type):
     return lhs is None or is_string(lhs)
예제 #5
0
 def accepts_rhs(cls, rhs):
     return is_string(rhs)
예제 #6
0
    def _match(self, lhs):
        if is_string(lhs) and lhs.lower() == 'false':
            return not self.rhs

        return bool(lhs) is self.rhs