So that we actually implement https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html#using-backslashes-for-with-statements:
Although when the target version is Python 3.9 or higher, Black will use parentheses instead since they’re allowed in Python 3.9 and higher.
I'll work on a PR to implement this when targeting Python 3.9+ 3.10+ (since it's only officially allowed in 3.10 https://docs.python.org/3/whatsnew/3.10.html#parenthesized-context-managers, though accidentally enabled in Python 3.9 with the new parser). (per discussion, enabling it for Python 3.9+ should be fine in practice)
Note: #2926 is related.
So that we actually implement https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html#using-backslashes-for-with-statements:
I'll work on a PR to implement this when targeting Python 3.9+
3.10+ (since it's only officially allowed in 3.10 https://docs.python.org/3/whatsnew/3.10.html#parenthesized-context-managers, though accidentally enabled in Python 3.9 with the new parser).(per discussion, enabling it for Python 3.9+ should be fine in practice)Note: #2926 is related.