Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@hunter.wrap(actions=[snooper, CodePrinter(stream=lines)])
def a():
foo = bar = b = 1
b = 2
foo = 3
foo = bar = 4
return b
def brief_probe(qualname, *actions, **kwargs):
return aspectlib.weave(qualname, functools.partial(hunter.wrap, actions=actions, **kwargs))
@hunter.wrap(local=True, action=lambda event: calls.append(
'%06s calls=%s depth=%s %s' % (event.kind, event.calls, event.depth, event.fullsource)))
def foo():
bar()
return 1
@hunter.wrap(action=lambda event: calls.append('%6r calls=%r depth=%r %s' % (event.kind, event.calls, event.depth, event.fullsource)))
def foo():
return 1