From 38d0f7a81d855b38754d12bc63d417001538d76d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:07:18 +0100 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=F0=9F=AA=9D=20update=20pre-c?= =?UTF-8?q?ommit=20hooks=20(#209)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- src/mqt/predictor/rl/helper.py | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61a3b0b04..e2b04fd5f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,7 +56,7 @@ repos: types_or: [yaml, markdown, html, css, javascript, json] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.2 hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -72,7 +72,7 @@ repos: additional_dependencies: [black==23.*] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy files: ^(src|tests) diff --git a/src/mqt/predictor/rl/helper.py b/src/mqt/predictor/rl/helper.py index 9c25ecbdd..e8f4c8527 100644 --- a/src/mqt/predictor/rl/helper.py +++ b/src/mqt/predictor/rl/helper.py @@ -501,13 +501,16 @@ def handle_downloading_model(download_url: str, model_name: str) -> None: total_length = int(r.headers.get("content-length")) # type: ignore[arg-type] fname = str(get_path_trained_model() / (model_name + ".zip")) - with Path(fname).open(mode="wb") as f, tqdm( - desc=fname, - total=total_length, - unit="iB", - unit_scale=True, - unit_divisor=1024, - ) as bar: + with ( + Path(fname).open(mode="wb") as f, + tqdm( + desc=fname, + total=total_length, + unit="iB", + unit_scale=True, + unit_divisor=1024, + ) as bar, + ): for data in r.iter_content(chunk_size=1024): size = f.write(data) bar.update(size)