MCPcopy Create free account
hub / github.com/StackStorm/st2 / cast_func

Function cast_func

st2common/st2common/models/api/base.py:176–178  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

174 if value_type == bool:
175
176 def cast_func(value):
177 value = str(value)
178 return value.lower() in ["1", "true"]
179
180 else:
181 cast_func = value_type

Callers 3

test_cast_stringMethod · 0.85
test_cast_arrayMethod · 0.85
cast_argument_valueFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_cast_stringMethod · 0.68
test_cast_arrayMethod · 0.68