You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional contextyapf keeps the snippet as shown in the desired section, autopep8 adds an indentation for the second line. No solution is really great, but black's solution is really unreadable imho.
The text was updated successfully, but these errors were encountered:
Yeah fair enough - I didn't take a deep look as I didn't want to explain how we in fact have plans to handle multiple context managers better even though it looks like this better handling has landed already since this corner case is detailed in the documentation :-)
The documentation saying that this should work is quite confusing...
I understand that #664 is still in the works and it requires 3.9, or will it work also on older versions?
@capitalaslash yeah unfortunately the documentation has been added before the actual support has been added. The plan in #664 will work on older Python versions as we are special casing context managers. See #664 (comment) and the comment below it.
Describe the style change Better management of multiple
with open
on same statementExamples in the current Black style
Desired style How do you think Black should format the above snippets:
Additional context
yapf
keeps the snippet as shown in the desired section,autopep8
adds an indentation for the second line. No solution is really great, butblack
's solution is really unreadable imho.The text was updated successfully, but these errors were encountered: