From e5db3f9b81725ebf983d8eb601351f4bd8774dbf Mon Sep 17 00:00:00 2001 From: Gerard Capes Date: Thu, 21 Jul 2022 17:20:26 +0100 Subject: [PATCH] Add workflow diagram for pre-commit --- git/pre-commit.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git/pre-commit.md b/git/pre-commit.md index 0bfe5fb..4f31e99 100644 --- a/git/pre-commit.md +++ b/git/pre-commit.md @@ -35,6 +35,10 @@ pip install pre-commit pre-commit install ``` +I found the pre-commit workflow above on a [blog](https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-using-black-and-flake8/) and it works like this: + +![black then flake8 diagram](https://ljvmiranda921.github.io/assets/png/tuts/precommit_pipeline.png) + ## Non-standard configuration of flake8 I've set flake8 to ignore long line errors in `.pre-commit-config.yaml`, because black doesn't format comment lines which then trigger flake8 errors.