The IDLE doc is available on its Help menu. It has a nice clickable drop down table of contents. Click TOCv and then Format ... under Menus, one will see, with the default wrapping on my machine, the following.
Format Paragraph
Reformat the current blank-line-delimited paragraph in comment block or multiline string or
selected line in a string. All lines in the paragraph will be formatted to less than N columns,
where N defaults to 72.
It seems clear to me that the above says the purpose is to format ‘paragraphs’ as described. Comment blocks and strings are text. The use is not limited to docstrings. I have also used this to re-wrap
paragraphs in
Not said is that reformatting indented ‘paragraphs’ preserves indents. Nor how to change the default. (‘Windows’ tab of ‘Settings’ dialog on ‘Options’ menu.)
Code does not come in paragraphs, and blindly wrapping long code lines will usually result in bad code.
This seems obvious enough, but I may add something when fixing the items above.
Reformat the current blank-line-delimited paragraph in comment block or multiline string or
selected line in a string. All lines in the paragraph will be formatted to less than N columns,
where N defaults to 72. It doesn't preserve indents, so it isn't a code formatter.