(*args)
return sorted(requirements)
Get requirements from pip requirement files.
Get requirements from pip requirement files.
Get requirements from pip requirement files .
def get_requirements(*args):
    """Get requirements from pip requirement files."""
    requirements = set()
    with open(get_absolute_path(*args)) as handle:
        for line in handle:
            # Strip comments.
            line = re.sub(r'^#.*|\s#.*', '', line)
            # Ignore empty lines
            if line and not line.isspace():
                requirements.add(re.sub(r'\s+', '', line))
    return sorted(requirements)
def get_requirements ( * args ) : requirements = set ( ) with open ( get_absolute_path ( * args ) ) as handle : for line in handle : # Strip comments. line = re . sub ( r'^#.*|\s#.*' , '' , line ) # Ignore empty lines if line and not line . isspace ( ) : requirements . add ( re . sub ( r'\s+' , '' , line ) ) return sorted ( requirements )