Skip to content

Commit e421876

Browse files
chore(deps): pre-commit.ci autoupdate (#575)
* chore(deps): pre-commit.ci autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.13 → v0.12.0](astral-sh/ruff-pre-commit@v0.11.13...v0.12.0) - [github.com/pre-commit/mirrors-mypy: v1.16.0 → v1.16.1](pre-commit/mirrors-mypy@v1.16.0...v1.16.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3f509db commit e421876

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818

1919
- repo: https://github.com/astral-sh/ruff-pre-commit
2020
# Ruff version.
21-
rev: v0.11.13
21+
rev: v0.12.0
2222
hooks:
2323
# Run the linter.
2424
- id: ruff
@@ -27,7 +27,7 @@ repos:
2727
- id: ruff-format
2828

2929
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v1.16.0
30+
rev: v1.16.1
3131
hooks:
3232
- id: mypy
3333
files: src

src/mplhep/plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ def iterable_not_string(arg):
230230
_chunked_kwargs.append({})
231231
for kwarg, kwarg_content in kwargs.items():
232232
# Check if iterable
233-
if iterable_not_string(kwargs[kwarg]):
233+
if iterable_not_string(kwarg_content):
234234
# Check if tuple of floats or ints (can be used for colors)
235-
if isinstance(kwargs[kwarg], tuple) and all(
235+
if isinstance(kwarg_content, tuple) and all(
236236
isinstance(x, (int, float)) for x in kwarg_content
237237
):
238238
for i in range(len(_chunked_kwargs)):
239239
_chunked_kwargs[i][kwarg] = kwarg_content
240240
else:
241-
for i, kw in enumerate(kwargs[kwarg]):
241+
for i, kw in enumerate(kwarg_content):
242242
_chunked_kwargs[i][kwarg] = kw
243243
else:
244244
for i in range(len(_chunked_kwargs)):

0 commit comments

Comments
 (0)