On May 31, 10:33 am, "Edward K. Ream" <[email protected]> wrote:
> 1. Leo's import commands produce good, but not perfect, outlines for > python imports. The temptation seems irresistible to "clean up" the > imports. This is pretty much pure yak shaving. > > Worse, the cleanup threatens to introduce unwanted changes. Diff are > a imperfect checks. It would be much better to make minimal changes > after importing. > > Before importing larger projects, I'll see if I can improve the > importers. This will benefit Leo generally. Touching the importers is not really necessary. The plan will be to update the workflow as follows: 1. bzr checkin of all *unchanged* file. 2. Import all files and save. 3. bzr commit all changed files. 4. Run cleanup script. 5. bzr qdiff then shows all cleanups. 6. bzr commit if all goes well. The key is step 4: a cleanup script. Yesterday's yak shaving could be called a prototype for the script. It will do the following: - Put docstring in root node. - Use section reference for declarations. - Remove leading and trailing blank lines from all nodes, leaving only a trailing newline. - If a new contains nothing but comments, merge it with the next node. - If a node contains nothing but a property, merge it with the previous node. Actually, though, the first two items on this list might be better done in the official importer. That way there will be few diffs. We'll see what turns out to be the most convenient. Note: the last two items can be done with the join-node-below and join- node-above commands. EKR -- 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.
