You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseException(f"A call of the {func.__name__} function in '{areaName}'s requirement, asks for a value of type {argType}\nfor its argument '{info.name}' but its missing")
294
299
300
+
295
301
ifnotisinstance(value, argType):
296
302
ifissubclass(argType, bool):
297
303
#Special conversion to bool
298
-
ifvaluein ['true', '1']:
304
+
ifvalue.lower()in ['true', '1']:
299
305
value=True
300
306
301
-
elifvaluein ['false', '0']:
307
+
elifvalue.lower()in ['false', '0']:
302
308
value=False
303
309
304
310
else:
305
-
# warning here spam the console, might be worth to make it a data validation instead
306
-
# logging.warn(f"A function in '{areaName}'s requirement, asks for a value of type {argType}\nfor its argument '{info.name}' but an unknown string was passed")
307
311
value=bool(value)
312
+
ifwarn:
313
+
# warning here spam the console if called from rules.py, might be worth to make it a data validation instead
314
+
logging.warn(f"A call of the {func.__name__} function in '{areaName}'s requirement, asks for a value of type {argType}\nfor its argument '{info.name}' but an unknown string was passed and thus converted to {value}")
0 commit comments