From 4b8560563ad758a00ab7ab62b35dc7086139c7b5 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 14 Jan 2020 14:59:08 +0000 Subject: [PATCH] pre-commit: Use Python 3 to run checks We need this otherwise flake8 will run in Python 2 mode, which results in syntax errors for Python 3-only syntax like kwarg-only functions. Change-Id: Id55dbce1d9a19ccaa4fe605985fb165e9b3ab48c Signed-off-by: Stephen Finucane --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33f8df5e336c..988f8da592dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,7 @@ --- +default_language_version: + # force all unspecified python hooks to run python3 + python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.4.0