@@ -76,7 +76,8 @@ def parser_exit(self, msg):
76
76
IGNORE = 5
77
77
78
78
79
- def parse_requirements (filename , finder = None , comes_from = None , options = None , session = None ):
79
+ def parse_requirements (filename , finder = None , comes_from = None , options = None ,
80
+ session = None ):
80
81
"""
81
82
Parse a requirements file and yield InstallRequirement instances.
82
83
@@ -93,13 +94,21 @@ def parse_requirements(filename, finder=None, comes_from=None, options=None, ses
93
94
"'session'"
94
95
)
95
96
96
- _ , content = get_file_content (filename , comes_from = comes_from , session = session )
97
- parser = parse_content (filename , content , finder , comes_from , options , session )
97
+ _ , content = get_file_content (
98
+ filename , comes_from = comes_from , session = session
99
+ )
100
+
101
+ parser = parse_content (
102
+ filename , content , finder , comes_from , options , session
103
+ )
104
+
98
105
for item in parser :
99
106
yield item
100
107
101
108
102
- def parse_content (filename , content , finder = None , comes_from = None , options = None , session = None ):
109
+ def parse_content (filename , content , finder = None , comes_from = None ,
110
+ options = None , session = None ):
111
+
103
112
# Split, sanitize and join lines with continuations.
104
113
content = content .splitlines ()
105
114
content = ignore_comments (content )
@@ -129,7 +138,8 @@ def parse_content(filename, content, finder=None, comes_from=None, options=None,
129
138
isolated = options .isolated_mode if options else False
130
139
default_vcs = options .default_vcs if options else None
131
140
yield InstallRequirement .from_editable (
132
- value , comes_from = comes_from , default_vcs = default_vcs , isolated = isolated
141
+ value , comes_from = comes_from ,
142
+ default_vcs = default_vcs , isolated = isolated
133
143
)
134
144
135
145
# ---------------------------------------------------------------------
@@ -141,7 +151,9 @@ def parse_content(filename, content, finder=None, comes_from=None, options=None,
141
151
req_dir = os .path .dirname (filename )
142
152
req_url = os .path .join (os .path .dirname (filename ), value )
143
153
# TODO: Why not use `comes_from='-r {} (line {})'` here as well?
144
- parser = parse_requirements (req_url , finder , comes_from , options , session )
154
+ parser = parse_requirements (
155
+ req_url , finder , comes_from , options , session
156
+ )
145
157
for req in parser :
146
158
yield req
147
159
0 commit comments