mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Add docstring to function parse_requirements
This commit is contained in:
parent
d8b497ea91
commit
882a0d3ec3
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user