mirror of https://github.com/pypa/pip
Move RequirementParts above new function
This commit is contained in:
parent
8fe2eb068a
commit
ad82dd0981
|
@ -178,6 +178,20 @@ def deduce_helpful_msg(req):
|
|||
return msg
|
||||
|
||||
|
||||
class RequirementParts(object):
|
||||
def __init__(
|
||||
self,
|
||||
requirement, # type: Optional[Requirement]
|
||||
link, # type: Optional[Link]
|
||||
markers, # type: Optional[Marker]
|
||||
extras, # type: Set[str]
|
||||
):
|
||||
self.requirement = requirement
|
||||
self.link = link
|
||||
self.markers = markers
|
||||
self.extras = extras
|
||||
|
||||
|
||||
def parse_req_from_editable(editable_req):
|
||||
# type: (str) -> RequirementParts
|
||||
name, url, extras_override = parse_editable(editable_req)
|
||||
|
@ -280,20 +294,6 @@ def _get_url_from_path(path, name):
|
|||
return path_to_url(path)
|
||||
|
||||
|
||||
class RequirementParts(object):
|
||||
def __init__(
|
||||
self,
|
||||
requirement, # type: Optional[Requirement]
|
||||
link, # type: Optional[Link]
|
||||
markers, # type: Optional[Marker]
|
||||
extras, # type: Set[str]
|
||||
):
|
||||
self.requirement = requirement
|
||||
self.link = link
|
||||
self.markers = markers
|
||||
self.extras = extras
|
||||
|
||||
|
||||
def parse_req_from_line(name, line_source):
|
||||
# type: (str, Optional[str]) -> RequirementParts
|
||||
if is_url(name):
|
||||
|
|
Loading…
Reference in New Issue