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
This commit is contained in:
Jon Dufresne 2020-12-31 09:09:07 -08:00 committed by GitHub
parent 60de5bbc32
commit af6f78f2ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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]