From a078a874601075602ba457e37cbf7af8a4fb340f Mon Sep 17 00:00:00 2001 From: Steve Schmerler Date: Mon, 29 Jul 2024 16:41:00 +0200 Subject: [PATCH] pre-commit: don't fix python version On a system with only Python 3.11 available, we get $ pre-commit run -a An unexpected error has occurred: CalledProcessError: command: ('/path/to/python/3.11.2/bin/python3.11', '-mvirtualenv', '/home/user42/.cache/pre-commit/repokdlvjmqs/py_env-python3.12', '-p', 'python3.12') return code: 1 stdout: RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.12' stderr: (none) We could also set this to python3.11, but I guess the more portable way is to rely on black's auto-detection. --- .pre-commit-config.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 766b84ef2..11a391d81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,8 +6,3 @@ repos: rev: 24.4.0 hooks: - id: black - # It is recommended to specify the latest version of Python - # supported by your project here, or alternatively use - # pre-commit's default_language_version, see - # https://pre-commit.com/#top_level-default_language_version - language_version: python3.12