On Tue, May 19, 2015 at 9:13 AM, Edward K. Ream <[email protected]> wrote:
>
I had forgotten that Leo's uses a customized version of PythonTidy in
leo/external/PythonTidy.py. This is required to handle Leo-specific tweaks.
As of rev 315bb24, Leo now uses the tweaked PythonTidy code for *all*
python-oriented pretty printing. The old token-oriented code was hopeless
and has been moved to the attic.
Here is the checkin log:
QQQQQ
All Python beautify code now uses leo/external/PythonTidy.py.
All tests pass.
Moved wretched token-based code to the attic.
Added several new settings, with defaults as shown:
@bool tidy_leo_call_continuation = False
@bool tidy_spaces_after_docstring = False
@int tidy_max_seps_func_def = 20
@int tidy_col_limit = 75
A bit more work is coming before beautify-tree can be used throughout Leo.
- I would prefer a blank line after def lines if there is no docstring.
The code warns on syntax errors.
This will happen in nodes containing @others.
QQQQQ
>>
Leo's beautification code contains some idiosyncrasies. I am going to
review those with an eye towards removing some or all of them.
Indeed, I think all my idiosyncrasies should go.
>
I'll ask for comments soon.
We are almost at a point where we can discuss the tidy-related settings
that should be in effect for all of Leo's core code. I suspect only one or
two settings will be at all controversial.
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.