Suggestion: Mention contextlib.ExitStack in "Use backslashes for with statements"? #2560
Labels
good first issue
Good for newcomers
T: documentation
Improvements to the docs (e.g. new topic, correction, etc)
Is this related to a problem? Please describe.
On Black's future style doc it talks about
black
handling awith
with multiple context managers in a few ways (Python-version-dependent).Describe the solution you'd like
Black should suggest to the user (in documentation only) that if they don't like Black's current or future behavior, that constructing a
contextlib.ExitStack
can help the issue while maintaining 95%-ish of the code readability and has minimal overhead.As an example (feel free to steal), and using the existing code on that page
Describe alternatives you've considered
N/A
Additional context
❤️ black
The text was updated successfully, but these errors were encountered: