(
        self,
        conversion,
        skip_value=None,
        skip_if=BaseConversion._none,
        keep_if=BaseConversion._none,
    )
Args:
          conversion (BaseConversion): conversion to be wrapped
          skip_value: value to compare with conversion result and to be
            excluded from the collection
          skip_if: a condition to be checked; if it resolves to True, then the
            item gets excluded from the collection
          keep_if: a condition to be checked; if it resolves to False, then the
            item gets excluded from the collection
Args:
          conversion (BaseConversion): conversion to be wrapped
          skip_value: value to compare with conversion result and to be
            excluded from the collection
          skip_if: a condition to be checked; if it resolves to True, then the
            item gets excluded from the collection
          keep_if: a condition to be checked; if it resolves to False, then the
            item gets excluded from the collection
Args : conversion ( BaseConversion ) : conversion to be wrapped skip_value : value to compare with conversion result and to be excluded from the collection skip_if : a condition to be checked ; if it resolves to True then the item gets excluded from the collection keep_if : a condition to be checked ; if it resolves to False then the item gets excluded from the collection
def __init__(
        self,
        conversion,
        skip_value=None,
        skip_if=BaseConversion._none,
        keep_if=BaseConversion._none,
    ):
        """
        Args:
          conversion (BaseConversion): conversion to be wrapped
          skip_value: value to compare with conversion result and to be
            excluded from the collection
          skip_if: a condition to be checked; if it resolves to True, then the
            item gets excluded from the collection
          keep_if: a condition to be checked; if it resolves to False, then the
            item gets excluded from the collection
        """
        super().__init__()
        condition_is_passed = (
            skip_if is not self._none or keep_if is not self._none
        )
        if condition_is_passed and skip_value is not None:
            raise Exception("both condition and skip_value are passed")
        self.conversion = self.ensure_conversion(conversion)
        if condition_is_passed:
            if skip_if is not self._none:
                self.condition = Not(self.ensure_conversion(skip_if))
            if keep_if is not self._none:
                self.condition = self.ensure_conversion(keep_if)
        else:
            if skip_value is None:
                self.condition = self.conversion.is_not(None)
            else:
                self.condition = self.conversion != self.ensure_conversion(
                    skip_value
                )
def __init__ ( self , conversion , skip_value = None , skip_if = BaseConversion . _none , keep_if = BaseConversion . _none , ) : super ( ) . __init__ ( ) condition_is_passed = ( skip_if is not self . _none or keep_if is not self . _none ) if condition_is_passed and skip_value is not None : raise Exception ( "both condition and skip_value are passed" ) self . conversion = self . ensure_conversion ( conversion ) if condition_is_passed : if skip_if is not self . _none : self . condition = Not ( self . ensure_conversion ( skip_if ) ) if keep_if is not self . _none : self . condition = self . ensure_conversion ( keep_if ) else : if skip_value is None : self . condition = self . conversion . is_not ( None ) else : self . condition = self . conversion != self . ensure_conversion ( skip_value )