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 ec8bf2c commit 0555261Copy full SHA for 0555261
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:
@@ -332,10 +340,7 @@ def install_req_from_line(
332
340
else:
333
341
req_as_string = name
334
342
335
- if extras_as_string:
336
- extras = Requirement("placeholder" + extras_as_string.lower()).extras
337
- else:
338
- extras = ()
343
+ extras = convert_extras(extras_as_string)
339
344
345
def with_source(text):
346
if not line_source:
0 commit comments