Rev 4993 continues my campaign to clean Leo's startup code.

As usual for recent commits, I advise extra care with this commit.
Please report any problems immediately.

A note of explanation for the recent work.  I have spent hours and
hours making the code as simple as I can possibly make it.  This
doesn't happen often, but when it does happen I want to do the best
job of it that I can possibly can. This is, truly, the last best
chance to clean this code.

I'll make significant changes to Leo's startup and configuration code
after all the cleanups.  Doing the cleanups first means that the
extended testing period will be using a relatively stable code base,
that is, the *cleaned* code base.

There is one more cleanup to do: Leo should have a TestManager class
that encapsulates the code in leoTest.leo.  I am coming to despise
modules that don't use classes to encapsulate their data.  I'll do
this today; it will be straightforward.  Once that is done I have one
unit-test-related bug to fix.

Here is the checkin log:  BTW, from now on the phrase "all usual
tests" will mean the following:

1. All unit tests pass.
2. pylint reports no errors on Leo's core files.
3. I have used the code myself without problems.

QQQQQ
Moved all startup code to LoadManager class. All usual tests pass.

leoApp.py:

- LoadManager class now contains almost all startup code.
- Simplified how LoadManager handles user options.

leoGlobals.py:

- Removed new_load switch.

leoTest.py:

- Fixed a real error reported by pylint: Use "as" in Except clauses.

runLeo.py:

- Moved almost all code in run() to LoadManager class in leoApp.py.
  Run now contains only:

    assert g.app
    g.app.loadManager = leoApp.LoadManager(fileName,pymacs)
    g.app.loadManager.load()

Many files:

- Added disambiguating comments for << imports >> section.
  Also, added << imports >> section for any file import leo.core.leoX
files.
  This allows the clone-fine-all command to see all imports of Leo's
core files.
QQQQQ

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to