forked from VimPlug/jedi
Better debugging with the increase_indent_cm
This commit is contained in:
@@ -84,13 +84,17 @@ def increase_indent(func):
|
||||
|
||||
|
||||
@contextmanager
|
||||
def increase_indent_cm():
|
||||
def increase_indent_cm(title=None):
|
||||
global _debug_indent
|
||||
if title:
|
||||
dbg('Start: ' + title, color='MAGENTA')
|
||||
_debug_indent += 1
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
_debug_indent -= 1
|
||||
if title:
|
||||
dbg('End: ' + title, color='MAGENTA')
|
||||
|
||||
|
||||
def dbg(message, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user