Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@dumped()
def method1(self, c1):
self_.assertTrue(isinstance(self, C2))
self_.assertEqual(c1['x'], 'c1')
return C1('res1')
@dumped()
async def func1(c1):
self.assertEqual(c1['x'], 'c1')
return C('c_res')
@dumped(parameters=False)
def func3(c1):
self.assertEqual(c1.x, 'c1')
return C('c_res')
@dumped()
def func4(c1: Base) -> Base:
self.assertEqual(c1['y'], 'c1')
self.assertFalse(hasattr(c1, 'x'))
return C('c_res')
@dumped()
def func1(c1):
self.assertEqual(c1['x'], 'c1')
return C('c_res')
@dumped()
def method3(c1):
self_.assertEqual(c1['x'], 'c1')
return C1('res3')
@dumped()
@staticmethod
def method4(c1):
pass # This won't work; you need to swap the decorators.
@dumped(dumper='anything')
def func():
pass
@dumped()
async def func1(c1):
self.assertEqual(c1['x'], 'c1')
return C('c_res')
@dumped()
def func1(c1):
self.assertEqual(c1['x'], 'c1')
return C('c_res')