From 4e9872426cb9d6e6f8e1755f9d067bca3c23908f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 19:19:51 +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/astral-sh/ruff-pre-commit: v0.11.5 → v0.15.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.5...v0.15.2) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.19.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.19.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e44b7b079..3f40c10a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.5 + rev: v0.15.2 hooks: - id: ruff args: [ --fix ] @@ -16,7 +16,7 @@ repos: types_or: ["python"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.15.0' + rev: 'v1.19.1' hooks: - id: mypy additional_dependencies: ["types-tabulate", "types-requests"] From 939bb9e47549d6a82b8919a60771139e9518f32f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 19:20:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- amlb/utils/core.py | 16 +++++++++------- amlb/utils/os.py | 6 ++++-- frameworks/H2OAutoML/exec.py | 6 ++++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/amlb/utils/core.py b/amlb/utils/core.py index ed1a1dcb4..48db91761 100644 --- a/amlb/utils/core.py +++ b/amlb/utils/core.py @@ -300,13 +300,15 @@ def as_list(*args): def flatten(iterable, flatten_tuple=False, flatten_dict=False): return reduce( lambda left, right: ( - left.extend(right) - if isinstance(right, (list, tuple) if flatten_tuple else list) - else left.extend(right.items()) - if flatten_dict and isinstance(right, dict) - else left.append(right) - ) - or left, + ( + left.extend(right) + if isinstance(right, (list, tuple) if flatten_tuple else list) + else left.extend(right.items()) + if flatten_dict and isinstance(right, dict) + else left.append(right) + ) + or left + ), iterable, [], ) diff --git a/amlb/utils/os.py b/amlb/utils/os.py index 131b559c0..9449637a2 100644 --- a/amlb/utils/os.py +++ b/amlb/utils/os.py @@ -195,8 +195,10 @@ def add_to_archive(file, isdir): walk_apply( path, add_to_archive, - filter_=lambda p: (filter_ is None or filter_(p)) - and not os.path.samefile(dest_archive, p), + filter_=lambda p: ( + (filter_ is None or filter_(p)) + and not os.path.samefile(dest_archive, p) + ), ) diff --git a/frameworks/H2OAutoML/exec.py b/frameworks/H2OAutoML/exec.py index 009ed49c7..b27c7fd69 100644 --- a/frameworks/H2OAutoML/exec.py +++ b/frameworks/H2OAutoML/exec.py @@ -283,8 +283,10 @@ def save_artifacts(automl, dataset, config): models_artifacts.append(models_archive) clean_dir( models_dir, - filter_=lambda p: p not in models_artifacts - and os.path.splitext(p)[1] in [".json", ".zip", ""], + filter_=lambda p: ( + p not in models_artifacts + and os.path.splitext(p)[1] in [".json", ".zip", ""] + ), ) if "model_predictions" in artifacts: