This is something that I've wanted to do for a long time.  The results
are gratifying: see the checkin log for details. This is the last
cleanup I plan to do this year.

As always, please report any problems immediately.  The usual tests
pass, but they are no guarantee.

Here is the checkin log:

QQQQQ
More cleanups centered around eliminating unnecessary imports.

Also, fixed pylint errors in leoKey.py. That file was mistakenly left
out of pylint checks.

All usual tests pass.

With these changes, most modules import only leo.core.leoGlobals.
However, the code still imports leo.core.leoNodes in order to create
positions, vnodes, etc.
It would be straightforward to eliminate these by creating g.app
factory methods,
but there is no urgent reason to do so.

Many files:

- Eliminate top-level imports using several devices,
  including using function-level imports for rarely-used imports.
  See the diffs for complete details.

leoApp.py:

- Added globalKillBuffer and globalRegisters commands.
  These eliminate the need for importing leoKeys in a few places.

- Added nullGui *ivar* that is pre-inited to leoGui.nullGui().
  This eliminates several imports of leoGui.
  This also replaces the createNullGui method.

- Removed unused init method. The LoadManager.initApp method is used
instead.

leoGui.py:

- Removed createKeyHandler methods.

leoKeys.py:

- Fixed several real problems found by pylint:
    - Disabled k.negativeArgument method. Presumably, it has never
worked.
    - Removed unused k.callKeyStrokeFunction. I have no idea what this
is supposed to do.

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