Skip to content

Instantly share code, notes, and snippets.

@loganlinn
Created October 10, 2020 07:53
Show Gist options
  • Save loganlinn/9108437be13701b20c19c6dc7e72a560 to your computer and use it in GitHub Desktop.
Save loganlinn/9108437be13701b20c19c6dc7e72a560 to your computer and use it in GitHub Desktop.
_ARCHIVE_EXTENSIONS = ["zip", "jar", "war", "tar", "tar.gz", "tgz", "tar.xz", "tar.bz2"]
def smells_like_archive(s):
return any([s.endswith(archive_ext) for archive_ext in _ARCHIVE_EXTENSIONS])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment