From: Jon Dufresne Date: Thu, 31 Dec 2020 17:09:07 +0000 (-0800) Subject: Add pyi file support to .pre-commit-hooks.yaml (#1875) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/af6f78f2ae408afebb375043930bbdd4c26599f5?ds=inline 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 --- 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]