@@ -25,6 +25,22 @@ package in `Pipfile`:
2525pipenv install --dev pipenv-setup
2626```
2727
28+ Additionally, starting with the
29+ [ ` 3.2.0 ` ] ( https://github.com/Madoshakalaka/pipenv-setup/releases/tag/v3.2.0 ) release,
30+ [ ` black ` ] ( https://github.com/psf/black ) and [ ` autopep8 ` ] ( https://github.com/hhatto/autopep8 ) can be
31+ included as package extras:
32+
33+ ``` bash
34+ pipenv install --dev " pipenv-setup[black]" # alternatively: pipenv-setup[autopep8]
35+ ```
36+
37+ ### Note
38+
39+ ` pipenv-setup<3.2 ` includes pinned versions of ` black ` and ` autopep8 ` as dependencies. However, most
40+ projects manage ` black ` requirements independently from ` pipenv-setup ` ; accordingly, ` black ` is no
41+ longer a requirement of ` pipenv-setup ` after ` 3.2.0 ` (instead, include it as an extra as shown
42+ above).
43+
2844## Features
2945
3046### Beautiful pipenv flavored help
@@ -198,9 +214,9 @@ You can run `pipenv-setup` automatically using a [pre-commit](https://pre-commit
198214started, add this configuration to your ` .pre-commit-config.yaml ` :
199215
200216``` yaml
201- - repo : https://github.com/Madoshakalaka/pipenv-setup
202- rev : ' 3.2.0' # pick a git hash / tag to point to
203- hooks :
217+ - repo : https://github.com/Madoshakalaka/pipenv-setup
218+ rev : " 3.2.0" # pick a git hash / tag to point to
219+ hooks :
204220 - id : pipenv-setup
205221` ` `
206222
@@ -210,12 +226,21 @@ This configuration will will execute `pipenv-setup sync --pipfile` on changes to
210226You can also customize the default args (`"--pipfile"`). For example, to synchronize `--dev` extras :
211227
212228` ` ` yaml
213- # ...
214- hooks:
229+ - repo: # ...
230+ hooks:
215231 - id: pipenv-setup
216232 args: [--dev, --pipfile]
217233` ` `
218234
235+ If using the hook during CI (or in another environment separate from a `black` / `autopep8`
236+ installation), you can include the appropriate auto-formatter with the hook :
237+
238+ ` ` ` yaml
239+ - repo: # ...
240+ hooks:
241+ - id: pipenv-setup
242+ additional_dependencies: [".[black]"]
243+ ` ` `
219244
220245# # Contributing
221246
0 commit comments