Unverified Commit af6f78f2 authored by Jon Dufresne's avatar Jon Dufresne Committed by GitHub
Browse files

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
parent 60de5bbc
Loading
Loading
Loading
Loading
+2 −1
Changes for .pre-commit-config.yaml: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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
+2 −1
Changes for .pre-commit-hooks.yaml: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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]