We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a974903 commit fa99d70Copy full SHA for fa99d70
src/pip/_internal/req/constructors.py
@@ -74,6 +74,14 @@ def _strip_extras(path):
74
return path_no_extras, extras
75
76
77
+def convert_extras(extras):
78
+ # type: (Optional[str]) -> Set[str]
79
+ if extras:
80
+ return Requirement("placeholder" + extras.lower()).extras
81
+ else:
82
+ return set()
83
+
84
85
def parse_editable(editable_req):
86
# type: (str) -> Tuple[Optional[str], str, Optional[Set[str]]]
87
"""Parses an editable requirement into:
@@ -295,10 +303,7 @@ def install_req_from_line(
295
303
else:
296
304
req_as_string = name
297
305
298
- if extras_as_string:
299
- extras = Requirement("placeholder" + extras_as_string.lower()).extras
300
- else:
301
- extras = ()
306
+ extras = convert_extras(extras_as_string)
302
307
308
def with_source(text):
309
if not line_source:
0 commit comments