From 1566be690fe927bf63740e99bbe18e8322ade9a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 22:48:20 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/asottile/pyupgrade: v3.19.1 → v3.22.0](https://github.com/asottile/pyupgrade/compare/v3.19.1...v3.22.0) - [github.com/pycqa/isort: 6.0.1 → 9.0.2](https://github.com/pycqa/isort/compare/6.0.1...9.0.2) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 25.1.0 → 26.10.1](https://github.com/psf/black-pre-commit-mirror/compare/25.1.0...26.10.1) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4642426..859338e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" + rev: "v6.0.0" hooks: - id: check-added-large-files exclude: ^docs/_static/k3d_(tesla|wr75)_example\.html$ @@ -26,18 +26,18 @@ repos: - id: trailing-whitespace types_or: [python, toml] - repo: https://github.com/asottile/pyupgrade - rev: v3.19.1 + rev: v3.22.0 hooks: - id: pyupgrade - repo: https://github.com/pycqa/isort # args set in pyproject.toml - rev: 6.0.1 + rev: 9.0.2 hooks: - id: isort name: isort (python) - id: isort name: isort (cython) types: [cython] - - repo: https://github.com/psf/black # args set in pyproject.toml - rev: 25.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror # args set in pyproject.toml + rev: 26.10.1 hooks: - id: black From b7bf1957a3474237bc5e815fba84a6975b2370d2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 22:49:04 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- release.py | 1 + src/simultipac/simulation_results/simulations_results.py | 2 +- src/simultipac/util/log_manager.py | 1 + tests/simulation_results/test_simulations_results.py | 4 ++-- tests/util/test_exponential_growth.py | 8 ++++---- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/release.py b/release.py index 091c9e7..9dce84e 100755 --- a/release.py +++ b/release.py @@ -8,6 +8,7 @@ python release.py """ + import re import subprocess import sys diff --git a/src/simultipac/simulation_results/simulations_results.py b/src/simultipac/simulation_results/simulations_results.py index aacd65c..a7d5b3d 100644 --- a/src/simultipac/simulation_results/simulations_results.py +++ b/src/simultipac/simulation_results/simulations_results.py @@ -228,7 +228,7 @@ def _to_plot( """ if to_plot is not None: - return [r for r in to_plot] + return [*to_plot] if id_to_plot is not None: return [self.get_by_id(id) for id in id_to_plot] if idx_to_plot is None: diff --git a/src/simultipac/util/log_manager.py b/src/simultipac/util/log_manager.py index ca1fe2b..76cabe5 100755 --- a/src/simultipac/util/log_manager.py +++ b/src/simultipac/util/log_manager.py @@ -12,6 +12,7 @@ https://en.wikipedia.org/wiki/ANSI_escape_code#Colors """ + import logging import subprocess import sys diff --git a/tests/simulation_results/test_simulations_results.py b/tests/simulation_results/test_simulations_results.py index a60d508..80b5537 100644 --- a/tests/simulation_results/test_simulations_results.py +++ b/tests/simulation_results/test_simulations_results.py @@ -117,7 +117,7 @@ def test_to_pandas() -> None: returned = SimulationsResults(results)._to_pandas("id", "e_acc") expected = pd.DataFrame( { - "id": [i for i in range(n_points)], + "id": [*range(n_points)], "e_acc": [i**2 for i in range(n_points)], } ) @@ -139,7 +139,7 @@ def test_to_pandas_with_exp_growth_params() -> None: returned = SimulationsResults(results)._to_pandas("id", "alpha") expected = pd.DataFrame( { - "id": [i for i in range(n_points)], + "id": [*range(n_points)], "alpha": [i**2 for i in range(n_points)], } ) diff --git a/tests/util/test_exponential_growth.py b/tests/util/test_exponential_growth.py index 43f2448..a9fa511 100644 --- a/tests/util/test_exponential_growth.py +++ b/tests/util/test_exponential_growth.py @@ -28,7 +28,7 @@ def test_indexes_for_fit_no_multipactor() -> None: time, population, fitting_range=5.0, minimum_number_of_points=0 ) - assert [i for i in indexes] == [1, 2, 3, 4, 5, 6] + assert [*indexes] == [1, 2, 3, 4, 5, 6] def test_indexes_for_fit_with_multipactor() -> None: @@ -41,7 +41,7 @@ def test_indexes_for_fit_with_multipactor() -> None: time, population, fitting_range=4.0, minimum_number_of_points=0 ) - assert [i for i in indexes] == [6, 7, 8, 9, 10] + assert [*indexes] == [6, 7, 8, 9, 10] def test_indexes_for_fit_fitting_larger_than_simulation_warning( @@ -57,7 +57,7 @@ def test_indexes_for_fit_fitting_larger_than_simulation_warning( time, population, fitting_range=5.0, minimum_number_of_points=0 ) - assert [i for i in indexes] == [0, 1, 2] + assert [*indexes] == [0, 1, 2] mock_warning.assert_called_once() @@ -74,7 +74,7 @@ def test_indexes_for_fit_fitting_not_enough_points_warning( time, population, fitting_range=2.0, minimum_number_of_points=5 ) - assert [i for i in indexes] == [0, 1, 2] + assert [*indexes] == [0, 1, 2] mock_warning.assert_called_once()