Skip to content

Commit

Permalink
#109: add an integration for pre-commit (#112)
Browse files Browse the repository at this point in the history
* feat: pre-commit support

Fixes #109

Co-authored-by: Bryant Finney <bfinney@hometap.com>

* skip pre-commit when not avail

Co-authored-by: Bryant Finney <bfinney@hometap.com>
  • Loading branch information
jrottenberg and Bryant Finney authored Feb 21, 2022
1 parent af5cb22 commit 54ae9c6
Show file tree
Hide file tree
Showing 6 changed files with 325 additions and 216 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/Madoshakalaka/pipenv-setup.git
rev: v3.2.0
hooks:
- id: pipenv-setup
additional_dependencies: [".[black]"]
args: [--dev, --pipfile]
9 changes: 9 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- id: pipenv-setup
name: pipenv-setup
description: "`pipenv-setup` is a command-line utility to sync pipfile/lockfile to setup.py"
entry: pipenv-setup sync
args: ["--pipfile"]
language: python
types: [file, non-executable, text]
files: Pipfile(\.lock)?|setup\.py
pass_filenames: false
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pytest-cov = "~=2.7"
pytest-datadir = "~=1.3"
pytest-xdist = "~=1.29"
tox = "~=3.24"
pre-commit = { markers = "python_version>='3.7'", version = "~=2.17"}
autopep8 = "~=1.4"
types-six = "*"

Expand Down
Loading

0 comments on commit 54ae9c6

Please sign in to comment.