PR #4494 is now in devel

9 views
Skip to first unread message

Edward K. Ream

unread,
Jan 11, 2026, 8:40:52 AM (10 days ago) Jan 11
to leo-editor
PR #4494 completes (for now) all work relating to the transition to ruff format as Leo's beautifier. It's time for us all to test the new code.

I highly recommend that all Python programmers use ruff format to beautify their code. To do that, you must set (in myLeoSettings.leo): @bool write-black-sentinels = True
Note that the default value (in leoSettings.leo) for this setting is False.

New settings

leoSettings.leo now contains two new settings with defaults as shown:

@string black-toml = None
@int black-line-length = None

These result in a default line length of 120, not 88. Let's not argue about these defaults--you can change them in your myLeoSettings.leo as you please.

Remaining work

I have just created two follow-on issues:

- #4495: The external files controller should avoid changing c.p if possible.
  This is a highly annoying issue. I don't know why nobody complained before.

- #4496: The beautify-on-write setting can be very slow.
  See the issue for a detailed discussion.

Summary

I highly recommend that all Python programmers use ruff format to beautify their code. To do that, you must set (in myLeoSettings.leo): @bool write-black-sentinels = True

Your questions, comments, bug reports, and suggestions are welcome.

Edward
Reply all
Reply to author
Forward
0 new messages