I often find myself writing a doctest, pasting it into a separate file, formatting it with Black then pasting it back into the doc string. It'd be very convenient if Black formatted the code in doctests, maybe it could be behind a flag.
I saw @ambv saying that doc strings are out of scope in another issue (#144 (comment)) but I see less controversy about formatting the doctests as they're code.
I often find myself writing a doctest, pasting it into a separate file, formatting it with Black then pasting it back into the doc string. It'd be very convenient if Black formatted the code in doctests, maybe it could be behind a flag.
I saw @ambv saying that doc strings are out of scope in another issue (#144 (comment)) but I see less controversy about formatting the doctests as they're code.