1
0
forked from VimPlug/jedi

Better debugging output for is_sub_class_of

This commit is contained in:
Dave Halter
2020-06-14 17:55:49 +02:00
parent 674e0114a5
commit 1d1c0ec3af
2 changed files with 11 additions and 7 deletions

View File

@@ -84,17 +84,17 @@ def increase_indent(func):
@contextmanager
def increase_indent_cm(title=None):
def increase_indent_cm(title=None, color='MAGENTA'):
global _debug_indent
if title:
dbg('Start: ' + title, color='MAGENTA')
dbg('Start: ' + title, color=color)
_debug_indent += 1
try:
yield
finally:
_debug_indent -= 1
if title:
dbg('End: ' + title, color='MAGENTA')
dbg('End: ' + title, color=color)
def dbg(message, *args, **kwargs):