From 76560f9516a60b267370d6caaceb1b137db34ebd Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Fri, 12 Dec 2025 11:02:29 +0000 Subject: [PATCH 1/2] Adjust pre-commit so Python 3.10 or highter can be used --- .pre-commit-config.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bec175de1..9ba7116610 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,29 @@ default_language_version: python: python3.10 repos: + - repo: local + hooks: + - id: check-python-version + name: Ensure Python ≥ 3.10 + language: python + pass_filenames: false + always_run: true + entry: python + args: + - -c + - | + import sys + + required_major = 3 + required_minor = 10 + current_major, current_minor = sys.version_info[:2] + + if (current_major, current_minor) < (required_major, required_minor): + print( + f"ERROR: Python {current_major}.{current_minor} is too old " + f"(requires ≥ {required_major}.{required_minor})." + ) + raise SystemExit(1) - repo: local hooks: - id: check-env-file From b55ab6731a44c67dd4412c731b31779475c022ef Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Fri, 12 Dec 2025 11:07:30 +0000 Subject: [PATCH 2/2] Apply suggestions from code review --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ba7116610..f99e61a8d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks default_language_version: - python: python3.10 + python: python3 repos: - repo: local