From dcc61e89ab02bbfd3c5870def7b8477c80d7da03 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 03:30:40 +0000 Subject: [PATCH 1/4] chore(deps): update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.282 → v0.0.285](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.282...v0.0.285) - [github.com/pre-commit/mirrors-mypy: v1.4.1 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.4.1...v1.5.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 839049a7..c2044458 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,13 +35,13 @@ repos: args: [--include-version-classifiers, --min-py3-version=3.7, --max-py-version=3.12] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.282" + rev: "v0.0.285" hooks: - id: ruff args: ["--fix", "--show-fixes"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.5.1 hooks: - id: mypy files: ^src From 3a6235f6bc4386fbb87a443c0d0a22b62dc6a41a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 03:31:17 +0000 Subject: [PATCH 2/4] style: pre-commit fixes --- examples/simple_log_weight.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/simple_log_weight.py b/examples/simple_log_weight.py index 7c2bdbf7..4db34f2a 100755 --- a/examples/simple_log_weight.py +++ b/examples/simple_log_weight.py @@ -18,9 +18,7 @@ for idx, (lower, upper) in enumerate(h.axes[0]): val = h[idx] print( - "bin {} [{:g}, {:g}): {} +/- {}".format( - idx, lower, upper, val.value, val.variance**0.5 - ) + f"bin {idx} [{lower:g}, {upper:g}): {val.value} +/- {val.variance**0.5}" ) # under- and overflow bin From f7b319bd3a89173931e49177880aefead26834b1 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 28 Aug 2023 18:13:02 -0400 Subject: [PATCH 3/4] Apply suggestions from code review --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2044458..d28f3b28 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: args: [--include-version-classifiers, --min-py3-version=3.7, --max-py-version=3.12] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.285" + rev: "v0.0.286" hooks: - id: ruff args: ["--fix", "--show-fixes"] From 34ab30aef488915fa73b8d55f9d50ba460433a15 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 22:14:29 +0000 Subject: [PATCH 4/4] style: pre-commit fixes --- examples/simple_log_weight.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/simple_log_weight.py b/examples/simple_log_weight.py index 4db34f2a..1ff8087a 100755 --- a/examples/simple_log_weight.py +++ b/examples/simple_log_weight.py @@ -17,9 +17,7 @@ # iterate over bins and access bin counter for idx, (lower, upper) in enumerate(h.axes[0]): val = h[idx] - print( - f"bin {idx} [{lower:g}, {upper:g}): {val.value} +/- {val.variance**0.5}" - ) + print(f"bin {idx} [{lower:g}, {upper:g}): {val.value} +/- {val.variance**0.5}") # under- and overflow bin lo, up = h.axes[0][bh.underflow]