Replying here 'cause I'm not sure it's worth re-opening beautify #68 for
more work at this point, but should still be in the record for future:
Over zealous escaping single quotes. Escapes those within triple quotes,
and behind comment markerS:
# this doesn't need a doesn\'t
''' and neither does this one: ain't it true? '''
Extra brackets (this might be just me discovering that I really do have a
strong personal preference at odds with pep8 after all ;-)
for k in "some, list, easy, to, type".split(', '):
...
d['path'],d['size'],d['md5'] = d['compound'].split()
becomes the extra noisy:
for k in ("some, list, easy, to, type").split(', '):
...
(d['path'], d['size'], d['md5']) = d['compound'].split()
cheers,
matt
On Fri, Oct 10, 2014 at 12:04 PM, Edward K. Ream <[email protected]>
wrote:
> This is a major upgrade to the beautify command.
>
> PythonTidy (tidy for short) does a full parse of the Python sources:
> https://pypi.python.org/pypi/PythonTidy/
>
> What I did today. See the << version info >> section for all the details::
>
> 1. Leonized tidy's sources: @file ../external/PythonTidy.py in in
> LeoPyRef.leo.
>
> - Removed all pylint complaints and made other minor mods.
>
> 2. Suppressed features not appropriate for Leo:
>
> - Adds shebang and encoding lines only for @<file> nodes.
> - Suppresses extra spacing between classes & functions.
>
> 3. Added settings to leoSettings.leo that control tidy operation:
>
> @bool tidy_add_blank_lines_around_comments =True
> @bool tidy_double_quoted_strings = False
> @bool tidy_keep_blank_lines = True
> @bool tidy_left_adjust_docstrings = False
> @int tidy_lines_before_split_lit = 2
> @int tidy_seps_before_split_line = 8
>
> 3. Fixed several important bugs:
>
> - The original code deleted all comments because of a botch in
> Comments__init__.
> - Tidy now properly handles the tidy_add_blank_lines_around_comments and
> tidy_double_quoted_strings settings.
>
> Please report any problems immediately.
>
> 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.
>
--
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.