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)