Skip to content

Commit

Permalink
Add pyi file support to .pre-commit-hooks.yaml (psf#1875)
Browse files Browse the repository at this point in the history
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:
pre-commit/pre-commit#607

Add the minimum_pre_commit_version to require pre-commit 2.9.0+.

Fixes psf#402
  • Loading branch information
jdufresne authored and noxan committed Jun 6, 2021
1 parent 2ce3bd8 commit dc79edf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit dc79edf

Please sign in to comment.