Closed Zac-HD closed 1 year ago
Thanks to https://github.com/psf/black/pull/3489, this now works on Python 3.9 and later. I propose that shed --refactor
should follow suit.
Python 3.7 will reach end of life before https://github.com/psf/black/issues/3484 ships (black == 24.1.0
at earliest), but we can enable this feature for 3.8 if Black ships it before 3.8 reaches EOL too.
https://github.com/psf/black/issues/664 proposes breaking very long
with
-statements using backslashes (< 3.9) or parentheses (>= 3.9), and shows the ugly current formatting for such statements.Once that's done, re-enabling
FixTrivialNestedWiths
will be an obvious win. If Black initially only supports parenthesised context managers we can re-enable this refactoring for py39+ only.