@classmethod
    def parse(cls, line, editable=False):
        if editable:
            req = cls('-e {0}'.format(line))
            req.is_editable = True
        else:
            req = cls(line)

        url = urlparse(line)
        req.uri = None
        if url.scheme:
            req.scheme = url.scheme
            req.uri = url.scheme + '://' + url.netloc + url.path
            fragment = url.fragment.split(' ')[0].strip()
            req.name = fragment.split('egg=')[-1] or None
            req.path = url.path
            if fragment:
                req.uri += '#{}'.format(fragment)
            if url.username or url.password:
                username = url.username or ''
                password = url.password or ''
                req.login = username + ':' + password
            if '@' in url.path:
                req.revision = url.path.split('@')[-1]

            for vcs in VCS:
                if req.uri.startswith(vcs):
                    req.vcs = vcs
            if req.scheme.startswith('file://'):
                req.is_local_file = True

        if not req.vcs and not req.is_local_file and 'egg=' not in line:
            # This is a requirement specifier.
            # Delegate to pkg_resources and hope for the best
            req.is_specifier = True
            pkg_req = Req.parse(line)
            req.name = pkg_req.unsafe_name
            req.extras = list(pkg_req.extras)
            req.specs = pkg_req.specs
            if req.specs:
                req.specs = sorted(req.specs)

        return req
Parses a Requirement from an "editable" requirement which is either
dataset/ETHPy150Open socketubs/requirements/examples/requirements.py/Requirement.parse