Skip to content

Commit ebc5e7c

Browse files
chore: update pre-commit hooks (#1456)
* chore: update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.12.2](astral-sh/ruff-pre-commit@v0.11.12...v0.12.2) - [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.14.0 → v2.15.0](macisamuele/language-formatters-pre-commit-hooks@v2.14.0...v2.15.0) * Ignore imports outside top level * Ignore eq without hash * Pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Andres Rios Tascon <ariostas@gmail.com>
1 parent 02a3401 commit ebc5e7c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
- id: black
2525

2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.11.12
27+
rev: v0.12.2
2828
hooks:
2929
- id: ruff
3030
args: [--fix, --show-fixes]
@@ -37,7 +37,7 @@ repos:
3737
args: [--py38-plus]
3838

3939
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
40-
rev: v2.14.0
40+
rev: v2.15.0
4141
hooks:
4242
- id: pretty-format-toml
4343
args: [--autofix]

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ ignore = [
159159
"S307", # no eval allowed
160160
"PLC1901", # empty string is falsey (but I don't want to rely on such weak typing)
161161
"RUF012", # enforces type annotations on a codebase that lacks type annotations
162-
"SIM103" # interferes with my if-elif-elif-else blocks
162+
"SIM103", # interferes with my if-elif-elif-else blocks
163+
"PLC0415", # imports outside top level
164+
"PLW1641" # __eq__ without __hash__
163165
]
164166
select = [
165167
"E",

src/uproot/reading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ def __getitem__(self, where):
20832083
last = step
20842084
step = step[head]
20852085
if isinstance(step, uproot.behaviors.TBranch.HasBranches):
2086-
return step["/".join([tail] + items[i + 1 :])]
2086+
return step["/".join([tail, *items[i + 1 :]])]
20872087
else:
20882088
raise uproot.KeyInFileError(
20892089
where,

src/uproot/writing/_cascade.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,7 @@ def _another_slice(slices, original_start, original_stop):
682682
for i in range(len(slices) - 1):
683683
if slices[i][1] == original_start and original_stop == slices[i + 1][0]:
684684
# These two slices need to be merged, including the newly released interval.
685-
return (
686-
slices[:i] + ((slices[i][0], slices[i + 1][1]),) + slices[i + 2 :]
687-
)
685+
return (*slices[:i], (slices[i][0], slices[i + 1][1]), *slices[i + 2 :])
688686

689687
for i, (start, stop) in enumerate(slices):
690688
if original_start == stop:

0 commit comments

Comments
 (0)