Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return 4
else:
return 2 ** 3
except ValueError:
foo = 0
for i in range(4):
foo += i
return foo
except TypeError:
return 42
else:
return 33
finally:
print("finished")
inlined_func = inliner.inline(pre_func, func, dict(b="pretty", c="world!"))
assert inliner.are_functions_equivalent(inlined_func, target_inlined_func)
def wrapper(func):
if progress_bar:
wrapped_func = inline(
progress_pre_func,
func,
dict(
queue=queue,
index=index,
counter=counter,
progression=PROGRESSION,
state=state,
time=time,
),
)
return wrapped_func
return func