[CI] fix lint error (#13891)

This commit is contained in:
Yibo Cai
2025-11-25 12:51:33 +08:00
committed by GitHub
parent 83e7207763
commit da182e4b83

View File

@@ -150,7 +150,11 @@ def safetensors_weights_iterator(
device = "cpu" if to_cpu else str(get_local_torch_device())
# Validate files before loading
corrupted_files = [st_file for st_file in hf_weights_files if not _validate_safetensors_file(st_file)]
corrupted_files = [
st_file
for st_file in hf_weights_files
if not _validate_safetensors_file(st_file)
]
if corrupted_files:
# Delete corrupted files (both symlink and blob if applicable)