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
That's not valid doctest, is it? My impression was that doctest is simply code copied from a standard CPython interpreter session with the default prompt and a lone decorator would be a syntax error there (you would always get at least one continuation line, though).
The way the implementation of the doctest format works right now is that it reads lines one-by-one (making sure doctest lines (>>> ) and continuation lines (... ) are grouped together), strips the prompts, applies black and then adds back the prompts and indentation.
Considering that, I don't think adding this is easy since the tool would need to actually parse the code; right now it delegates that entirely to black. Instead, I think improving the error message would be easier (<line number missing in source> is not really helpful).
blackdoc currently crashes on
It could automatically replace the second >>> with ...
The text was updated successfully, but these errors were encountered: