@@ -17,10 +17,9 @@ Be the change et al if Windows is your main and you wanna raise a PR with broad
1717* [ python_template] ( #python_template )
1818 * [ Summary] ( #summary )
1919 * [ Caveat Emptor] ( #caveat-emptor )
20- * [ Setup] ( ../README.md #setup)
20+ * [ Setup] ( #setup )
2121 * [ Usage] ( #usage )
2222 * [ Mac and Linux users] ( #mac-and-linux-users )
23- * [ git pre-commit hooks] ( #git-pre-commit-hooks )
2423 * [ TODO] ( #todo )
2524
2625## Setup
@@ -37,56 +36,6 @@ Be the change et al if Windows is your main and you wanna raise a PR with broad
3736### Mac and Linux users
3837Development environments and tooling are first-class citizens on macOS and * nix. For Windows faithfuls, please setup [ WSL] ( markdown/wsl.md ) .
3938
40- ### git pre-commit hooks
41- * Install
42- ``` bash
43- # pip
44- python -m pip install pre-commit
45-
46- # brew
47- brew install pre-commit
48-
49- # install .pre-commit-config.yaml
50- pre-commit install # install/uninstall
51- ```
52- * Usage
53- ` ` ` bash
54- # skip pre-commit by ID
55- SKIP=flake8 git commit -m " foo"
56-
57- # skip all pre-commit hooks (e.g., bypass false positives like comment preceding docstring)
58- λ git commit -m " Formatting (WIP)" -m " Debugging formatters" --no-verify
59- [master d260d56] Formatting (WIP)
60- 1 file changed, 108 insertions(+), 34 deletions(-)
61-
62- # black dry-run
63- black --check --diff file_name.py
64-
65- # skip code block
66- # fmt: off
67-
68- import argparse
69- # from icecream import ic
70- from pathlib import Path
71-
72- # fmt: on
73-
74- # skip individual line (buggy)
75- # from icecream import ic # fmt: skip
76-
77- # manually run commit hook against one file
78- pre-commit run black --files email_it/email_it.py --verbose
79-
80- # manually run against repo (vs. during commit)
81- λ pre-commit run --all-files
82- [INFO] Initializing environment for https://github.com/zricethezav/gitleaks.
83- < SNIP>
84- Detect hardcoded secrets.................................................Passed
85-
86- # update hooks
87- pre-commit autoupdate
88- ` ` `
89-
9039## TODO
9140* Django
9241 * Merge with [ docker_python] ( https://github.com/pythoninthegrass/docker_python ) and put the latter on an ice float
0 commit comments