From f9e151ebf19809f768e30b55789dca5527969892 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:09:23 +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: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...26.3.1) - [github.com/pycqa/flake8: 7.1.1 → 7.3.0](https://github.com/pycqa/flake8/compare/7.1.1...7.3.0) - [github.com/asottile/pyupgrade: v3.18.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.18.0...v3.21.2) - [github.com/asottile/reorder-python-imports: v3.14.0 → v3.16.0](https://github.com/asottile/reorder-python-imports/compare/v3.14.0...v3.16.0) - [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/pre-commit/mirrors-mypy: v1.12.0 → v1.20.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.12.0...v1.20.2) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f95bbfb..a76e114 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: -- repo: https://github.com/psf/black - rev: 24.10.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black name: black @@ -13,7 +13,7 @@ repos: types_or: [python, pyi] - repo: https://github.com/pycqa/flake8 - rev: 7.1.1 + rev: 7.3.0 hooks: - id: flake8 additional_dependencies: @@ -22,19 +22,19 @@ repos: - flake8-simplify - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py310-plus] - repo: https://github.com/asottile/reorder-python-imports - rev: v3.14.0 + rev: v3.16.0 hooks: - id: reorder-python-imports args: [--py310-plus, --add-import, "from __future__ import annotations"] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-builtin-literals - id: check-added-large-files @@ -66,7 +66,7 @@ repos: # additional_dependencies: [".[toml]"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.12.0 + rev: v1.20.2 hooks: - id: mypy language_version: python3.12 From e2ca8c3a7f23ba3a1bba13c81f814ec4dc77fe9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:10:20 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/model_metadata/__init__.py | 1 - src/model_metadata/main.py | 1 - src/model_metadata/model_data_files.py | 6 +++--- src/model_metadata/model_parameter.py | 3 +-- src/model_metadata/modelmetadata.py | 1 - tests/yaml_test.py | 1 - 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/model_metadata/__init__.py b/src/model_metadata/__init__.py index a20e9bc..8aed776 100644 --- a/src/model_metadata/__init__.py +++ b/src/model_metadata/__init__.py @@ -5,7 +5,6 @@ from model_metadata.model_info import ModelInfo from model_metadata.modelmetadata import ModelMetadata - __all__ = [ "__version__", "ModelInfo", diff --git a/src/model_metadata/main.py b/src/model_metadata/main.py index 255d6df..37acfbd 100644 --- a/src/model_metadata/main.py +++ b/src/model_metadata/main.py @@ -20,7 +20,6 @@ from model_metadata.errors import MissingValueError from model_metadata.modelmetadata import ModelMetadata - out = partial(print, file=sys.stderr) diff --git a/src/model_metadata/model_data_files.py b/src/model_metadata/model_data_files.py index 1466137..e628492 100644 --- a/src/model_metadata/model_data_files.py +++ b/src/model_metadata/model_data_files.py @@ -53,7 +53,7 @@ def to_file(self, dest: str, **kwds: dict[str, Any]) -> str: os.makedirs(os.path.realpath(dest), exist_ok=True) dest = os.path.join(dest, self.tail) - (base, ext) = os.path.splitext(dest) + base, ext = os.path.splitext(dest) if ext == ".tmpl": dest = base @@ -97,14 +97,14 @@ def format_template_file(src: str, dest: str, **kwds: dict[str, Any]) -> None: dest : str Path to output file that will contain the substitutions. """ - (srcdir, fname) = os.path.split(src) + srcdir, fname = os.path.split(src) dest = os.path.abspath(dest) if dest.endswith(os.path.sep): os.makedirs(os.path.realpath(dest), exist_ok=True) dest = os.path.join(dest, fname) - (base, ext) = os.path.splitext(dest) + base, ext = os.path.splitext(dest) if ext == ".tmpl": dest = base diff --git a/src/model_metadata/model_parameter.py b/src/model_metadata/model_parameter.py index 32ed8f3..ed4b14f 100644 --- a/src/model_metadata/model_parameter.py +++ b/src/model_metadata/model_parameter.py @@ -10,7 +10,6 @@ import yaml from model_metadata._utils import setup_yaml_with_canonical_dict - setup_yaml_with_canonical_dict() @@ -70,7 +69,7 @@ def infer_range( def range_as_tuple( - range: tuple[float, float] | None + range: tuple[float, float] | None, ) -> tuple[None, None] | tuple[float, float]: if range is None: return (None, None) diff --git a/src/model_metadata/modelmetadata.py b/src/model_metadata/modelmetadata.py index 3ddf637..9cf458c 100644 --- a/src/model_metadata/modelmetadata.py +++ b/src/model_metadata/modelmetadata.py @@ -25,7 +25,6 @@ from model_metadata._utils import load_component from model_metadata._utils import parse_entry_point - setup_yaml_with_canonical_dict() diff --git a/tests/yaml_test.py b/tests/yaml_test.py index b17be39..ab9ff69 100644 --- a/tests/yaml_test.py +++ b/tests/yaml_test.py @@ -5,7 +5,6 @@ from model_metadata.model_parameter import setup_yaml_with_canonical_dict from pytest import approx - setup_yaml_with_canonical_dict()