From 4e79fbcd71fc017fe2d202603fffc51a542faeac Mon Sep 17 00:00:00 2001 From: Yilei Yang Date: Mon, 23 Jan 2023 19:04:19 -0800 Subject: [PATCH 1/2] Update document now that paren wrapping CMs on Python 3.9+ is implemented. --- docs/the_black_code_style/future_style.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/the_black_code_style/future_style.md b/docs/the_black_code_style/future_style.md index 9ca260fc0ad..d77468db6fc 100644 --- a/docs/the_black_code_style/future_style.md +++ b/docs/the_black_code_style/future_style.md @@ -31,8 +31,8 @@ with \ ... # backslashes and an ugly stranded colon ``` -Although when the target version is Python 3.9 or higher, _Black_ will, when we -implement this, use parentheses instead since they're allowed in Python 3.9 and higher. +Although when the target version is Python 3.9 or higher, _Black_ uses parentheses +instead since they're allowed in Python 3.9 and higher. An alternative to consider if the backslashes in the above formatting are undesirable is to use {external:py:obj}`contextlib.ExitStack` to combine context managers in the From bd344a7a1e947cdbf7259a001a86ecf8a8f98d94 Mon Sep 17 00:00:00 2001 From: Yilei Yang Date: Mon, 23 Jan 2023 21:23:47 -0800 Subject: [PATCH 2/2] Mention preview mode. --- docs/the_black_code_style/future_style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/the_black_code_style/future_style.md b/docs/the_black_code_style/future_style.md index d77468db6fc..7a0b2d8f07a 100644 --- a/docs/the_black_code_style/future_style.md +++ b/docs/the_black_code_style/future_style.md @@ -32,7 +32,7 @@ with \ ``` Although when the target version is Python 3.9 or higher, _Black_ uses parentheses -instead since they're allowed in Python 3.9 and higher. +instead in `--preview` mode (see below) since they're allowed in Python 3.9 and higher. An alternative to consider if the backslashes in the above formatting are undesirable is to use {external:py:obj}`contextlib.ExitStack` to combine context managers in the