Add docstring to function parse_requirements

This commit is contained in:
kxrd 2017-06-10 20:52:17 +02:00
parent d8b497ea91
commit 882a0d3ec3

View File

@ -223,6 +223,17 @@ def join(f):
return os.path.join(os.path.dirname(__file__), f) return os.path.join(os.path.dirname(__file__), f)
def parse_requirements(file_): def parse_requirements(file_):
"""Parse a requirements formatted file.
Args:
file_: File to parse.
Raises:
OSerror: If there's any issues accessing the file.
Returns:
tuple: The contents of the file, excluding comments.
"""
modules = [] modules = []
delim = ["<", ">", "=", "!", "~"] # https://www.python.org/dev/peps/pep-0508/#complete-grammar delim = ["<", ">", "=", "!", "~"] # https://www.python.org/dev/peps/pep-0508/#complete-grammar