From 9fd8680c8389f306aae6336741455df9c1604b11 Mon Sep 17 00:00:00 2001 From: Prakash Maheshwaran <73785492+Prakashmaheshwaran@users.noreply.github.com> Date: Mon, 9 Jun 2025 04:34:34 -0400 Subject: [PATCH] add pre-commit hook to enforce Python version 3.11-3.13 (#2636) --- .pre-commit-config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 12719f9e..24b08702 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,14 @@ repos: - id: check-symlinks - id: debug-statements - id: detect-private-key + - repo: local + hooks: + - id: check-python-version + name: Check Python Version (3.11-3.13) + entry: python -c "import sys; assert (3,11) <= sys.version_info[:2] <= (3,13), f'Python {sys.version_info[:2]} not supported. Use Python 3.11-3.13'" + language: system + pass_filenames: false + always_run: true - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.11.13