On Thu, Sep 14, 2023 at 7:05 AM Edward K. Ream wrote: *Summary* > > > I rarely want to insert many tracing or debugging statements. When I do, > neither Sherlock nor similar scripting helpers will help much. > > > Instead, a cff followed by a regex search/replace will work. >
Wow. That was an understatement. For mypy, the following regex search/replace suffices: regex: (\bdef .*?-> T:\n) repl: \1 g.trace(self.__class__.__name__, visitor.__class__.__name__) ###\n *Note*: The traces are different even though the g.trace statement itself is the same everywhere. An even simpler search/replace will suffice to remove (or comment out) the newly-inserted traces. The only complication is adding the following statement in the appropriate places: from leo.core import leoGlobals as g I have just closed Leo issue #3562 <https://github.com/leo-editor/leo-editor/issues/3562> and the related PR. They are not worth doing. Edward -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS0qBzxdD3F1NJwQTGVXAzoCujGMusYkMZishyw1E67QcA%40mail.gmail.com.