The beautify and blacken now commands work reliably. The code is in devel.
There are minor differences between them, discussed below.
This page summarizes all related issues. All open issues are marked "Maybe".
blacken vs beautify
Similarities:
- By default, both commands retain underindented comments.
- Both commands ensure that the meaning (parse trees) of body text remains unchanged.
- Both commands do a much better job of reporting errors than before.
- Both commands are covered by strong unit tests.
Differences:
- The beautify commands do not split or join lines.
The "orange" switch will remain False until further notice.
- There are minor differences in how blacken and beautify format python slices.
- The beautify commands never regularizes strings.
By default, the blacken commands do not regularize strings.
Settings
The defaults are as shown:
@bool beautify-keep-comment-indentation = True
@bool beautify-keep-blank-lines = True
@bool black-keep-comment-indentation = True # Major improvement.
@bool black-string-normalization = False
@int black-line-length = 88
Summary
The blacken and beautify commands work well:
- Both commands understand Leonine syntax.
- Both verify that no changes alter the meaning of text.
- Both are covered by strong unit tests.
All open issues beautification issues are marked "Maybe". None will happen any time soon.
Beautifying source code can become an obsession, but it is of little actual importance. It's time to move on!
Edward