As part of the mypy checks I have to split the values returned by get_const_val in case they are per part values (i.e. the function returns a list)
I have to check each of the values, and specifically, I was doing something like
for v in val:
if not v:
return None
The issue is that if v is exactly 0 or 0.0, not v will be True. So I changed the check to "if v is None"
Also, I took advantage of the PR to make consistent the behavior when a calculator function cannot be computed, always raising a RunTimeError instead of just returning NOne
As part of the mypy checks I have to split the values returned by get_const_val in case they are per part values (i.e. the function returns a list)
I have to check each of the values, and specifically, I was doing something like
for v in val: if not v: return None
The issue is that if v is exactly 0 or 0.0, not v will be True. So I changed the check to "if v is None"
Also, I took advantage of the PR to make consistent the behavior when a calculator function cannot be computed, always raising a RunTimeError instead of just returning NOne