Skip to content

Commit 54ae9c6

Browse files
jrottenbergBryant Finney
andauthored
#109: add an integration for pre-commit (#112)
* feat: pre-commit support Fixes #109 Co-authored-by: Bryant Finney <[email protected]> * skip pre-commit when not avail Co-authored-by: Bryant Finney <[email protected]>
1 parent af5cb22 commit 54ae9c6

File tree

6 files changed

+325
-216
lines changed

6 files changed

+325
-216
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/Madoshakalaka/pipenv-setup.git
3+
rev: v3.2.0
4+
hooks:
5+
- id: pipenv-setup
6+
additional_dependencies: [".[black]"]
7+
args: [--dev, --pipfile]

.pre-commit-hooks.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- id: pipenv-setup
2+
name: pipenv-setup
3+
description: "`pipenv-setup` is a command-line utility to sync pipfile/lockfile to setup.py"
4+
entry: pipenv-setup sync
5+
args: ["--pipfile"]
6+
language: python
7+
types: [file, non-executable, text]
8+
files: Pipfile(\.lock)?|setup\.py
9+
pass_filenames: false

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pytest-cov = "~=2.7"
1212
pytest-datadir = "~=1.3"
1313
pytest-xdist = "~=1.29"
1414
tox = "~=3.24"
15+
pre-commit = { markers = "python_version>='3.7'", version = "~=2.17"}
1516
autopep8 = "~=1.4"
1617
types-six = "*"
1718

0 commit comments

Comments
 (0)