From 131cb367b00e6c244520a260b9ac3d0fdf9dfc9e Mon Sep 17 00:00:00 2001 From: Alexander Suslov Date: Thu, 6 Jun 2024 16:36:02 +0400 Subject: [PATCH] bandit happy (#2722) ### Changes `# nosec` is added because `urlretrieve` function is used with the hard code url ### Reason for changes Suppress bandit issue ### Related tickets ref: 143381 ### Tests build 862 --- examples/quantization_aware_training/torch/anomalib/main.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/quantization_aware_training/torch/anomalib/main.py b/examples/quantization_aware_training/torch/anomalib/main.py index 5ad4f348db6..f90ca45cd3b 100644 --- a/examples/quantization_aware_training/torch/anomalib/main.py +++ b/examples/quantization_aware_training/torch/anomalib/main.py @@ -44,11 +44,7 @@ def download_and_extract(root: Path, info: download.DownloadInfo) -> None: downloaded_file_path = root / info.url.split("/")[-1] print(f"Downloading the {info.name} dataset.") with download.DownloadProgressBar(unit="B", unit_scale=True, miniters=1, desc=info.name) as progress_bar: - urlretrieve( - url=f"{info.url}", - filename=downloaded_file_path, - reporthook=progress_bar.update_to, - ) + urlretrieve(url=f"{info.url}", filename=downloaded_file_path, reporthook=progress_bar.update_to) # nosec print("Checking the hash of the downloaded file.") download.check_hash(downloaded_file_path, info.hashsum) print(f"Extracting the {info.name} dataset.")