Re: PR #4493 is now in devel

2026-01-12 Thread Edward K. Ream
On Mon, Jan 12, 2026 at 3:37 PM Thomas Passin  wrote:

See this page .
> You can search Leo's code for *fmt: on*, *fmt: off*, and *fmt: skip*. All
> three are useful in various situations.
>
>
> That's all very well but how would we apply fmt: on, etc,  when we want to
> run ruff from within Leo?
>

I get that the new workflow is confusing. I'll be documenting the new
workflow and settings in the new release notes.

The main idea is to use # fmt statements to control ruff format within your
Python files.

You can then run ruff format outside of Leo. Or within Leo if you set the
following settings as shown:

*@bool beautify-python-code-on-write = True*
*@bool write-black-sentinels = True*

You can also specify line length with this setting:

*@int black-line-length = 120*

I'd be happy to zoom with you about all this if you would like.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2031c27dtYwdYbPQk1R3cfdRb4jywsK%3D21m%3DSqWk7jeg%40mail.gmail.com.


Re: PR #4493 is now in devel

2026-01-12 Thread Thomas Passin

On Saturday, January 10, 2026 at 5:39:19 PM UTC-5 Edward K. Ream wrote:

On Sat, Jan 10, 2026 at 8:16 AM Thomas Passin  wrote:


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? 


See this page . 
You can search Leo's code for *fmt: on*, *fmt: off*, and *fmt: skip*. All 
three are useful in various situations.


That's all very well but how would we apply fmt: on, etc,  when we want to 
run ruff from within Leo?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/47c1dd01-c762-478f-9413-ccf9976f4398n%40googlegroups.com.


Re: PR #4493 is now in devel

2026-01-10 Thread Edward K. Ream
On Sat, Jan 10, 2026 at 8:16 AM Thomas Passin  wrote:

>
> 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?
>

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

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1SzG45PZF%2By8%2B71bReefVwzkM0CzVTyvKvoa%2BOFsGHZA%40mail.gmail.com.


Re: PR #4493 is now in devel

2026-01-10 Thread Edward K. Ream
On Sat, Jan 10, 2026 at 2:57 PM jkn  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

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1jx-tJoKGUgfW2vNq_Jzvr5q%3Db-T%3DB2VVhsAsa-mjt1Q%40mail.gmail.com.


Re: PR #4493 is now in devel

2026-01-10 Thread jkn
They are (I presume) the ruff pragmas mentioned in the first of Edwards 
posts on this topic, a thread or two ago


On Saturday, January 10, 2026 at 2:16:35 PM UTC [email protected] wrote:

> 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? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/416257a0-9363-49ee-8657-63c80e4ba173n%40googlegroups.com.


Re: PR #4493 is now in devel

2026-01-10 Thread Thomas Passin

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? 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/f24ee25f-7efd-4735-96c5-08c09d517ca4n%40googlegroups.com.