ci: appease the linter

This commit is contained in:
Will Greenberg 2024-05-01 15:40:43 -07:00
parent 920204bce0
commit 87f55cf11a

View file

@ -55,10 +55,10 @@ def _fetch_asset(asset: str, assets_path: str) -> str:
def _unzip_asset(zipped_data: bytes, asset_name: str) -> Optional[bytes]:
zip_file = zipfile.ZipFile(io.BytesIO(zipped_data))
for entry in zip_file.filelist:
if not entry.is_dir() and entry.filename.endswith(asset_name):
return zip_file.read(entry)
with zipfile.ZipFile(io.BytesIO(zipped_data)) as zip_file:
for entry in zip_file.filelist:
if not entry.is_dir() and entry.filename.endswith(asset_name):
return zip_file.read(entry)
return None