On Monday, May 26, 2014 9:20:24 AM UTC-5, Edward K. Ream wrote: > > I've just added leoSTC.py (Static Type Checking) to Leo's core... > > For example, no type analysis is needed to rename class name A to class > name B provided that name A is defined only once and name B is not defined > anywhere. In this (common) case, there is no need for fancy refactoring > code: a script can do a global find/replace. This should be of great help > in converting all class names to pep8 style. >
The @test DataTraverser unit test in the new leo/test/stc_unit_tests.py file now reports the following ambiguous class names, preceded by the number of definitions of each name. 15 chapter 3 chapterController 53 command 4 leoFrame 3 leoLog 557 node 3 nodeIndices 4 shadowController These are probably the only class names that can not be capitalized easily with a global search/replace. It should be easy to distinguish assignments from calls to ctors. These stats do highlight how useful it is to capitalize all class names. Edward P.S. The DataTraverser class is the simplest thing that could possibly work. It is a straightforward ast traverser. It knows nothing about types, and yet it is of great practical value. I hope this will be a pattern that can be extended to other situations. P.P.S. I'll continue to work on integrating Rope into Leo. Eventually, this should be useful for Leo's users. It will also provide a test bed for understanding in more detail just exactly how Rope work. EKR -- 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.
