def _build_req_from_url(url):

    parts = [p for p in url.split('#', 1)[0].split('/') if p]

    req = None
    if ('tags', 'branches', 'tag', 'branch') in parts[-2]:
        req = parts[-3]
    elif parts[-1] == 'trunk':
        req = parts[-2]
    return req
dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/site-packages/pip/req/req_install.py/_build_req_from_url/swapped operands of `in`