Open
Description
Currently it fails with an error:
import snoop
class Test:
# TypeError: compile() arg 1 must be a string, bytes or AST object
@snoop
@classmethod
def class_test(cls):
pass
Workaround:
import snoop
class Test:
@classmethod
@snoop
def class_test(cls):
pass
Injecting snoop to a classmethod at runtime:
Test.class_test = classmethod(snoop(Test.class_test.__func__))
Metadata
Metadata
Assignees
Labels
No labels