PR #3564 (beautify only changed files) merged into devel

22 views
Skip to first unread message

Edward K. Ream

unread,
Nov 15, 2023, 8:14:24 AM11/15/23
to leo-editor
PR #3654 allows a significant performance to my workflow.

Without the new --force option, Leo's beautifier command only beautifies files that git marks as changed. In practice, this speeds up beautification by at least 10x.

The PR also beautifies all of Leo's plugins. This should have been done ages ago.

I'm wondering: does anyone besides myself use Leo's beautifier?

Edward

Thomas Passin

unread,
Nov 15, 2023, 9:48:07 AM11/15/23
to leo-editor
I haven't really been aware of it.  I'm always leery of forced or automatic formatting changes, so I like to be able to say when I want it to happen.

Edward K. Ream

unread,
Nov 15, 2023, 10:09:37 AM11/15/23
to leo-e...@googlegroups.com
On Wed, Nov 15, 2023 at 8:48 AM Thomas Passin <tbp1...@gmail.com> wrote:
I haven't really been aware of it.  I'm always leery of forced or automatic formatting changes, so I like to be able to say when I want it to happen.

That's my attitude as well. With default settings, Orange never does any of the following:

- inserts or deletes newlines,
- changes indentation,
- changes the contents of comments or strings, including string delims.

In other words, the only thing Orange does is follow PEP8 guidelines for spaces between tokens.  In this respect, Orange does exactly what Black does. Or rather, what Black did last year. Sometimes Black changes its behavior.

Also, Orange deletes trailing whitespace, something that pylint complains about. Doing so makes calling reindent unnecessary, a significant speedup.

Imo, Orange does exactly what is required and nothing else.

Edward
Reply all
Reply to author
Forward
0 new messages