MCPcopy Index your code
hub / github.com/QData/TextAttack / unzip_file

Function unzip_file

textattack/shared/utils/install.py:112–117  ·  view source on GitHub ↗

Unzips a .zip file to folder path.

(path_to_zip_file, unzipped_folder_path)

Source from the content-addressed store, hash-verified

110
111
112def unzip_file(path_to_zip_file, unzipped_folder_path):
113 """Unzips a .zip file to folder path."""
114 logger.info(f"Unzipping file {path_to_zip_file} to {unzipped_folder_path}.")
115 enclosing_unzipped_path = pathlib.Path(unzipped_folder_path).parent
116 with zipfile.ZipFile(path_to_zip_file, "r") as zip_ref:
117 zip_ref.extractall(enclosing_unzipped_path)
118
119
120def http_get(url, out_file, proxies=None):

Callers 2

download_from_s3Function · 0.85
download_from_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected