mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
CI: fix python version
Turns out this is important for the black formatting tool to work correctly. The formatting won't generally change between python versions (it only depends on `black`'s version), but the formatted code needs to be parseable by the system python version. One script uses ```python def foo[T](x: T) -> T: ``` syntax, which is only supported in Python 3.12 and later. Running `pre-commit` will now require a python 3.12 installation (which is already what we mandate for internal developer environment setup). The error in case of absence of such a version is pretty clear though.
This commit is contained in:
@@ -1,5 +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.12
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
|
||||
Reference in New Issue
Block a user