Advise users to install pre-commit in local repo
@@ -32,7 +32,13 @@ deps = git+git://github.com/cherrypy/cheroot.git@master#egg=cheroot
[testenv:pre-commit]
deps =
pre-commit
-commands = pre-commit run --all-files {posargs}
+commands =
+ {envpython} -m pre_commit run --show-diff-on-failure {posargs:--all-files}
+
+ # Print out the advice of how to install pre-commit from this env into Git:
+ -{envpython} -c \
+ 'cmd = "{envpython} -m pre_commit install"; scr_width = len(cmd) + 10; sep = "=" * scr_width; cmd_str = " $ " + cmd; '\
+ 'print("\n" + sep + "\nTo install pre-commit hooks into the Git repo, run:\n\n" + cmd_str + "\n\n" + sep + "\n")'
[testenv:pre-commit-pep257]
deps = pre-commit
