(lines_enum, options)
return lines_enum
Skip lines that match '--skip-requirements-regex' pattern

    Note: the regex pattern is only built once
Skip lines that match '--skip-requirements-regex' pattern
Skip lines that match -- skip - requirements - regex pattern
def skip_regex(lines_enum, options):
    # type: (ReqFileLines, Optional[optparse.Values]) -> ReqFileLines
    """
    Skip lines that match '--skip-requirements-regex' pattern

    Note: the regex pattern is only built once
    """
    skip_regex = options.skip_requirements_regex if options else None
    if skip_regex:
        pattern = re.compile(skip_regex)
        lines_enum = filterfalse(lambda e: pattern.search(e[1]), lines_enum)
    return lines_enum
def skip_regex ( lines_enum , options ) : # type: (ReqFileLines, Optional[optparse.Values]) -> ReqFileLines skip_regex = options . skip_requirements_regex if options else None if skip_regex : pattern = re . compile ( skip_regex ) lines_enum = filterfalse ( lambda e : pattern . search ( e [ 1 ] ) , lines_enum ) return lines_enum