File tree 1 file changed +1
-12
lines changed
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ def with_source(text: str) -> str:
338
338
339
339
def _parse_req_string (req_as_string : str ) -> Requirement :
340
340
try :
341
- req = get_requirement (req_as_string )
341
+ return get_requirement (req_as_string )
342
342
except InvalidRequirement :
343
343
if os .path .sep in req_as_string :
344
344
add_msg = "It looks like a path."
@@ -353,17 +353,6 @@ def _parse_req_string(req_as_string: str) -> Requirement:
353
353
if add_msg :
354
354
msg += f"\n Hint: { add_msg } "
355
355
raise InstallationError (msg )
356
- else :
357
- # Deprecate extras after specifiers: "name>=1.0[extras]"
358
- # This currently works by accident because _strip_extras() parses
359
- # any extras in the end of the string and those are saved in
360
- # RequirementParts
361
- for spec in req .specifier :
362
- spec_str = str (spec )
363
- if spec_str .endswith ("]" ):
364
- msg = f"Extras after version '{ spec_str } '."
365
- raise InstallationError (msg )
366
- return req
367
356
368
357
if req_as_string is not None :
369
358
req : Optional [Requirement ] = _parse_req_string (req_as_string )
You can’t perform that action at this time.
0 commit comments