PR #2495 (A mass code cleaning) has been merged into devel

35 views
Skip to first unread message

Edward K. Ream

unread,
Mar 18, 2022, 3:54:13 PM3/18/22
to leo-editor
PR #2495 fixes a systematic violation of PEP 8 rules.  Leo no longer uses hanging indents anywhere except in the npyscreen code.

This PR also beautifies all files except the npyscreen files.  In all, the PR changes 97 files.

I have reviewed (briefly) all the files. More importantly, pyflakes, pylint, mypy and all unit tests pass.  Still, such widespread changes could cause problems.  Please report any problems immediately.

Edward

tbp1...@gmail.com

unread,
Mar 18, 2022, 4:57:57 PM3/18/22
to leo-editor
A gutsy move! Thank goodness for Version Control Systems, eh?

So far, VR3, Freewin, and a few scripts of mine seem to work normally.

Edward K. Ream

unread,
Mar 18, 2022, 7:12:29 PM3/18/22
to leo-editor
On Fri, Mar 18, 2022 at 3:57 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
A gutsy move! Thank goodness for Version Control Systems, eh?

And the other tools.

So far, VR3, Freewin, and a few scripts of mine seem to work normally.

Thanks for the testing.

Edward

Edward K. Ream

unread,
Mar 19, 2022, 5:16:20 PM3/19/22
to leo-editor
On Friday, March 18, 2022 at 6:12:29 PM UTC-5 Edward K. Ream wrote:
On Fri, Mar 18, 2022 at 3:57 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:

>> A gutsy move! Thank goodness for Version Control Systems, eh?

> And the other tools.

The risks in mass updates arise from checking large diffs.

Rev 135c95d in devel adds the script "script: diff-two-revs-wo-comments" to scripts.leo.  This script monkey-patches Leo's GitDiffController so that the diffs mostly ignore comments.  This script makes the diffs for PR #2495 much more manageable.

The script isn't perfect, but imo it makes it possible to see whether changing comments may have inadvertently changed something else.

Take a look if you like.

Edward

Edward K. Ream

unread,
Mar 19, 2022, 5:31:46 PM3/19/22
to leo-editor
On Saturday, March 19, 2022 at 4:16:20 PM UTC-5 Edward K. Ream wrote:

Rev 135c95d in devel adds the script "script: diff-two-revs-wo-comments" to scripts.leo.  This script monkey-patches Leo's GitDiffController so that the diffs mostly ignore comments.  This script makes the diffs for PR #2495 much more manageable.

I have just updated this script in devel. One of the monkey-patched functions wasn't doing anything!

That's all to the good. The faulty function was supposed to simplify the top-level summary diff nodes, but that's going to far. The summary diff nodes show the actual diffs, which would be important if there were a real problem.  Otoh, the child nodes only show diffs not involving comments, and the script makes those diffs easy to check.

In other words, the script is a useful balance between completeness and conciseness.

Edward
Reply all
Reply to author
Forward
0 new messages