diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f367715..37f6b2e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: additional_dependencies: [pyyaml] - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs additional_dependencies: [black==23.*] @@ -61,13 +61,13 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.8 + rev: v21.1.5 hooks: - id: clang-format exclude: \.ipynb$ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.10 + rev: v0.14.4 hooks: - id: ruff args: [--fix-only, --show-fixes] diff --git a/src/geant4_python_application/files/datasets.py b/src/geant4_python_application/files/datasets.py index 503e4b6..ef2eff8 100644 --- a/src/geant4_python_application/files/datasets.py +++ b/src/geant4_python_application/files/datasets.py @@ -241,15 +241,14 @@ def install_datasets(show_progress: bool = True): disable=not show_progress, unit="B", unit_scale=True, - ) as pbar: - with concurrent.futures.ThreadPoolExecutor( - max_workers=len(datasets_to_download) - ) as executor: - futures = [ - executor.submit(_download_extract_dataset, dataset, pbar) - for dataset in datasets_to_download - ] - concurrent.futures.wait(futures) + ) as pbar, concurrent.futures.ThreadPoolExecutor( + max_workers=len(datasets_to_download) + ) as executor: + futures = [ + executor.submit(_download_extract_dataset, dataset, pbar) + for dataset in datasets_to_download + ] + concurrent.futures.wait(futures) if show_progress: total_size_gb = sum(