示例#1
0
文件: index.py 项目: jaraco/pip
def _is_url_like_archive(url):
    """Return whether the URL looks like an archive.
    """
    filename = Link(url).filename
    for bad_ext in ARCHIVE_EXTENSIONS:
        if filename.endswith(bad_ext):
            return True
    return False
示例#2
0
def _is_url_like_archive(url):
    """Return whether the URL looks like an archive.
    """
    filename = Link(url).filename
    for bad_ext in ARCHIVE_EXTENSIONS:
        if filename.endswith(bad_ext):
            return True
    return False
def _is_url_like_archive(url):
    # type: (str) -> bool
    """Return whether the URL looks like an archive.
    """
    filename = Link(url).filename
    return any(filename.endswith(bad_ext) for bad_ext in ARCHIVE_EXTENSIONS)