PyFunceble/adblock.py
def _is_to_ignore(cls, line):
        """
        Check if we have to ignore the given line.

        :param line: The line from the file.
        :type line: str
        """

        # We set the list of regex to match to be
        # considered as ignored.
        to_ignore = [r"(^!|^@@|^\/|^\[|^\.|^-|^_|^\?|^&)"]  # , r"(\$|,)(image)"]

        for element in to_ignore:
            # We loop through the list of regex.

            if Regex(line, element, return_data=False).match():
                # The currently read line match the currently read
                # regex.

                # We return true, it has to be ignored.
                return True

        # Wer return False, it does not has to be ignored.
        return False
def _is_to_ignore(cls, line):
        # We set the list of regex to match to be
        # considered as ignored.
        to_ignore = [r"(^!|^@@|^\/|^\[|^\.|^-|^_|^\?|^&)"]  # , r"(\$|,)(image)"]

        for element in to_ignore:
            # We loop through the list of regex.

            if Regex(line, element, return_data=False).match():
                # The currently read line match the currently read
                # regex.

                # We return true, it has to be ignored.
                return True

        # Wer return False, it does not has to be ignored.
        return False
def _is_to_ignore ( cls , line ) : # We set the list of regex to match to be # considered as ignored. to_ignore = [ r"(^!|^@@|^\/|^\[|^\.|^-|^_|^\?|^&)" ] # , r"(\$|,)(image)"] for element in to_ignore : # We loop through the list of regex. if Regex ( line , element , return_data = False ) . match ( ) : # The currently read line match the currently read # regex. # We return true, it has to be ignored. return True # Wer return False, it does not has to be ignored. return False
Check if we have to ignore the given line.

        :param line: The line from the file.
        :type line: str
Check if we have to ignore the given line .