Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@deal.ensure(lambda a, b, result: a > 0 and b > 0 and result != 'same number')
def func(a, b):
if a == b:
return 'same number'
else:
return 'different numbers'
@deal.ensure(lambda a, b, result: a > 0 and b > 0 and result != 'same number')
def func(a, b):
if a == b:
return 'same number'
else:
return 'different numbers'
@deal.ensure(lambda a, b, result: a > 0 and b > 0 and result != 'same number')
async def func(a, b):
if a == b:
return 'same number'
else:
return 'different numbers'
@deal.ensure(lambda *args, **kwargs: True)
@deal.raises(ValueError)
@deal.offline()
@deal.offline
@deal.safe
@deal.safe()
@deal.silent
@deal.silent()
@deal.pure
@deal.chain(deal.safe, deal.silent)
def func(x: int) -> int:
"""docs were before docker
"""
return x
@deal.ensure(lambda x, y, result: result > y ** 2)
def multiply(x, y):
yield x * y
yield x * y * 2
yield x * y * 4
@deal.ensure(lambda _: _.result.endswith(_.right))
@deal.has()
def concat(left: str, right: str) -> str:
return left + right