Open bmwoodruff opened 3 months ago
Looks like black is designed to format long code, so that may work. I'll have to substract the indent (and may be the >>>
) from the length, but I think this will work for getting input code lengths shrunk to under 79 characters. I know they're planning to increase the limit to 88 soon. If they get that done before we're done, then we swap a number.
The package textwrap will format long strings. This works for the headers between code blocks. If they are multiline, then combine them into a string before wrapping them and then writing them.
I'm not yet sure about formatting the output cells to be 79 or less.
Description:
The current
reviewtools.py
fileprocess_text_block
does not check forThis causes two problems:
spin lint
, the generated examples will fail if longer than 79 characters (thanks @jud-sdev for help in #87).python tools/refguide_check --doctests
, random output will fail (thanks @ogidig5 for help in #86).I'd like to automate much of this.
reviewtools.py
with two new functions to do this.Acceptance Criteria:
reviewtools.py