def __call__(self, item, **kwargs): self.logger.debug('__call__ %s with %s (allow_none is %s)', self.name, item, self.allow_none) if item is None and self.allow_none: return True return XCheck.__call__(self, item, **kwargs)
def __call__(self, item, **kwargs): self.as_datetime = kwargs.pop('as_datetime', False) self.as_struct = kwargs.pop('as_struct', False) self.as_string = kwargs.pop('as_string', False) self.as_date = kwargs.pop('as_date', False) kwargs['normalize'] = any( [self.as_datetime, self.as_struct, self.as_string, self.as_date]) return XCheck.__call__(self, item, **kwargs)
def __call__(self, item, **kwargs): self.as_string = kwargs.pop('as_string', False) if self.as_string: kwargs['normalize'] = True return XCheck.__call__(self, item, **kwargs)
def __call__(self, item, **kwargs): self.as_string = kwargs.pop("as_string", False) if self.as_string: kwargs["normalize"] = True return XCheck.__call__(self, item, **kwargs)