pubslish .instrumentation

This commit is contained in:
AF 2022-11-04 04:44:20 +00:00
parent faa96816f9
commit ec72c46329
2 changed files with 14 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class Instrumentation(Generic[IType]):
raise NotImplementedError
def __enter__(self: IType) -> IType:
self: Instrumentation
assert isinstance(self, Instrumentation)
assert not hasattr(self, '_method')
assert not hasattr(self, '_wrap')
method = getattr(self.target, self.methodname)
@ -56,4 +56,5 @@ class Instrumentation(Generic[IType]):
self.deinstrument()
def enter(self: IType, stack: ExitStack) -> IType:
assert isinstance(self, Instrumentation)
return stack.enter_context(self)

12
setup.py Normal file
View File

@ -0,0 +1,12 @@
from setuptools import setup
setup(
name='rainbowadn',
version='',
packages=['rainbowadn.instrumentation'],
url='',
license='',
author='PARRRATE TNV',
author_email='',
description=''
)