Skip to content

Commit 6ee089b

Browse files
chore: update pre-commit hooks (pybamm-team#5073)
* chore: update pre-commit hooks 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) * Fix pre-commit * Apply suggestions from code review * Revert suggestions --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: kratman <[email protected]> Co-authored-by: Eric G. Kratz <[email protected]>
1 parent 27e9257 commit 6ee089b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: "v0.11.13"
7+
rev: "v0.12.0"
88
hooks:
99
- id: ruff
1010
args: [--fix, --show-fixes]

src/pybamm/solvers/solution.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,10 @@ def __add__(self, other):
752752
)
753753
if other.all_ts[0][0] == self.all_ts[-1][-1]:
754754
# Skip first time step if it is repeated
755-
all_ts = self.all_ts + [other.all_ts[0][1:]] + other.all_ts[1:]
756-
all_ys = self.all_ys + [other.all_ys[0][:, 1:]] + other.all_ys[1:]
755+
all_ts = [*self.all_ts, other.all_ts[0][1:], *other.all_ts[1:]]
756+
all_ys = [*self.all_ys, other.all_ys[0][:, 1:], *other.all_ys[1:]]
757757
if hermite_interpolation:
758-
all_yps = self.all_yps + [other.all_yps[0][:, 1:]] + other.all_yps[1:]
758+
all_yps = [*self.all_yps, other.all_yps[0][:, 1:], *other.all_yps[1:]]
759759
else:
760760
all_ts = self.all_ts + other.all_ts
761761
all_ys = self.all_ys + other.all_ys

0 commit comments

Comments
 (0)