Skip to content

Commit

Permalink
chore(deps): update pre-commit hooks (#873)
Browse files Browse the repository at this point in the history
* chore(deps): update pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.282 → v0.0.285](astral-sh/ruff-pre-commit@v0.0.282...v0.0.285)
- [github.com/pre-commit/mirrors-mypy: v1.4.1 → v1.5.1](pre-commit/mirrors-mypy@v1.4.1...v1.5.1)

* style: pre-commit fixes

* Apply suggestions from code review

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
  • Loading branch information
pre-commit-ci[bot] and henryiii authored Aug 29, 2023
1 parent 728a1cd commit 674ba4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.286"
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
Expand Down
6 changes: 1 addition & 5 deletions examples/simple_log_weight.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
# iterate over bins and access bin counter
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
)
)
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]
Expand Down

0 comments on commit 674ba4b

Please sign in to comment.