From 256b3bfdff80edb26cd11e12241969f8128a1004 Mon Sep 17 00:00:00 2001 From: jlplenio Date: Mon, 10 Oct 2022 23:01:29 +0200 Subject: [PATCH 1/3] Clarify check argument is needed for github action workflow --- docs/integrations/github_actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/github_actions.md b/docs/integrations/github_actions.md index 12bcb21fee6..d4c302a6c63 100644 --- a/docs/integrations/github_actions.md +++ b/docs/integrations/github_actions.md @@ -44,7 +44,7 @@ extra. Installing the extra and including Jupyter Notebook files can be configur `jupyter` (default is `false`). You can also configure the arguments passed to _Black_ via `options` (defaults to -`'--check --diff'`) and `src` (default is `'.'`) +`'--check --diff'`) and `src` (default is `'.'`). Please note that the [`'--check'` argument](https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#exit-code) is required so that the workflow fails if _Black_ finds files that need to be formatted. Here's an example configuration: From 6b045f5fda521b599c65c9c41c8ca97bcab29ca2 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Plenio Date: Tue, 11 Oct 2022 11:40:14 +0200 Subject: [PATCH 2/3] prettier max line length fix --- docs/integrations/github_actions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/integrations/github_actions.md b/docs/integrations/github_actions.md index d4c302a6c63..69c0321f16d 100644 --- a/docs/integrations/github_actions.md +++ b/docs/integrations/github_actions.md @@ -44,7 +44,9 @@ extra. Installing the extra and including Jupyter Notebook files can be configur `jupyter` (default is `false`). You can also configure the arguments passed to _Black_ via `options` (defaults to -`'--check --diff'`) and `src` (default is `'.'`). Please note that the [`'--check'` argument](https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#exit-code) is required so that the workflow fails if _Black_ finds files that need to be formatted. +`'--check --diff'`) and `src` (default is `'.'`). Please note that the +[`'--check'` argument](https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#exit-code) +is required so that the workflow fails if _Black_ finds files that need to be formatted. Here's an example configuration: From 3a26151bd476a14b9772f0f7252a0741de8458be Mon Sep 17 00:00:00 2001 From: Richard Si <63936253+ichard26@users.noreply.github.com> Date: Fri, 14 Oct 2022 18:26:47 -0400 Subject: [PATCH 3/3] Add myst label and tweak link text --- docs/integrations/github_actions.md | 4 ++-- docs/usage_and_configuration/the_basics.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/integrations/github_actions.md b/docs/integrations/github_actions.md index 69c0321f16d..ebfcc2d95a2 100644 --- a/docs/integrations/github_actions.md +++ b/docs/integrations/github_actions.md @@ -45,8 +45,8 @@ extra. Installing the extra and including Jupyter Notebook files can be configur You can also configure the arguments passed to _Black_ via `options` (defaults to `'--check --diff'`) and `src` (default is `'.'`). Please note that the -[`'--check'` argument](https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#exit-code) -is required so that the workflow fails if _Black_ finds files that need to be formatted. +[`--check` flag](labels/exit-code) is required so that the workflow fails if _Black_ +finds files that need to be formatted. Here's an example configuration: diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 20aa956dd85..80897532a68 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -76,6 +76,8 @@ _Black_ to just tell you what it _would_ do without actually rewriting the Pytho There's two variations to this mode that are independently enabled by their respective flags. Both variations can be enabled at once. +(labels/exit-code)= + #### Exit code Passing `--check` will make _Black_ exit with: