From af6f78f2ae408afebb375043930bbdd4c26599f5 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 31 Dec 2020 09:09:07 -0800 Subject: [PATCH] Add pyi file support to .pre-commit-hooks.yaml (#1875) Since pre-commit 2.9.0 (2020-11-21), the types_or key can be used to match multiple disparate file types. For more upstream details, see: https://github.com/pre-commit/pre-commit/issues/607 Add the minimum_pre_commit_version to require pre-commit 2.9.0+. Fixes #402 --- .pre-commit-config.yaml | 3 ++- .pre-commit-hooks.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e12e46..c2580d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,8 +8,9 @@ repos: name: black language: system entry: black + minimum_pre_commit_version: 2.9.0 require_serial: true - types: [python] + types_or: [python, pyi] - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.1 diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index c59213e..c575842 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -4,5 +4,6 @@ entry: black language: python language_version: python3 + minimum_pre_commit_version: 2.9.0 require_serial: true - types: [python] + types_or: [python, pyi] -- 2.39.5