PR #4493 is now in devel

10 views
Skip to first unread message

Edward K. Ream

unread,
Jan 10, 2026, 8:20:51 AM (yesterday) Jan 10
to leo-editor
PR #4493 uses ruff format when  @bool beautify-python-code-on-write = True

I merged it immediately because the PR removes a "race" condition when beautifying python code automatically. Previously, ruff format and Leo's legacy formatter would be in conflict. Now, once again, it's safe to set @bool beautify-python-code-on-write to True.

There will be one more PR related to ruff format. This PR will acknowledge what's already so, namely that @beautify and @nobeautify no longer have any effect. Leo's users should use the fmt: pragmas instead.

This PR will move Leo's legacy beautifier to the attic. I'll wait longer for review comments for this last PR.

All your comments are welcome. Please report any problems immediately.

Edward

Thomas Passin

unread,
Jan 10, 2026, 9:16:35 AM (yesterday) Jan 10
to leo-editor
On Saturday, January 10, 2026 at 8:20:51 AM UTC-5 Edward K. Ream wrote:
PR #4493 uses ruff format when  @bool beautify-python-code-on-write = True

There will be one more PR related to ruff format. This PR will acknowledge what's already so, namely that @beautify and @nobeautify no longer have any effect. Leo's users should use the fmt: pragmas instead.

What the heck are those? Where do we find information about them? 

jkn

unread,
Jan 10, 2026, 3:57:37 PM (18 hours ago) Jan 10
to leo-editor
They are (I presume) the ruff pragmas mentioned in the first of Edwards posts on this topic, a thread or two ago

Edward K. Ream

unread,
Jan 10, 2026, 5:34:59 PM (17 hours ago) Jan 10
to leo-e...@googlegroups.com


On Sat, Jan 10, 2026 at 2:57 PM jkn <jkn...@nicorp.co.uk> wrote:

They [the way to control syntax coloring] are (I presume) the ruff pragmas mentioned in the first of Edwards posts on this topic, a thread or two ago.

Yes, ruff's (and black's) #fmt pragmas are now the main way to control beautification. I rather like them, especially #fmt: skip.

It's not exactly true that @beautify and @nobeautify have no effect, but their effects are limited to languages other than Python.

HTH. All questions are welcome.

Edward

Edward K. Ream

unread,
Jan 10, 2026, 5:39:19 PM (17 hours ago) Jan 10
to leo-e...@googlegroups.com
See this page. You can search Leo's code for fmt: on, fmt: off, and fmt: skip. All three are useful in various situations.

Edward

Reply all
Reply to author
Forward
0 new messages