File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 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:
338338
339339 def _parse_req_string (req_as_string : str ) -> Requirement :
340340 try :
341- req = get_requirement (req_as_string )
341+ return get_requirement (req_as_string )
342342 except InvalidRequirement :
343343 if os .path .sep in req_as_string :
344344 add_msg = "It looks like a path."
@@ -353,17 +353,6 @@ def _parse_req_string(req_as_string: str) -> Requirement:
353353 if add_msg :
354354 msg += f"\n Hint: { add_msg } "
355355 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
367356
368357 if req_as_string is not None :
369358 req : Optional [Requirement ] = _parse_req_string (req_as_string )
You can’t perform that action at this time.
0 commit comments