I'm not sure I understood the changes made here previously with the is_flag checks. Firstly, if the Parameter is a Argument, it'll thrown an error because Argument doesn't have is_flag, only Option does (Parameter can be Argument or Option). So, one could check with hasattr to avoid the error thrown. However, I don't see the point of even checking for is_flag. The check that was here actually caused the Parameter to be set to None if the default value of the Parameter was equal to the value of the parameter given in the Work object ---> I don't quite understand where that logic came from.
I don't think is_flag changes anything. If the parameter value is not given in the Work object, we should use the default value of the Parameter. If it is given, then we just use that value, no? Because right now, for CHAMPSS, any Option we have with is_flag and no default value (None) is just ignored, since the default value of None is not equal to the value we give it (True/False). Again don't quite understand that previous logic.
I'm not sure I understood the changes made here previously with the is_flag checks. Firstly, if the
Parameter
is aArgument
, it'll thrown an error becauseArgument
doesn't haveis_flag
, onlyOption
does (Parameter
can beArgument
orOption
). So, one could check withhasattr
to avoid the error thrown. However, I don't see the point of even checking foris_flag
. The check that was here actually caused theParameter
to be set toNone
if the default value of theParameter
was equal to the value of the parameter given in the Work object ---> I don't quite understand where that logic came from.I don't think
is_flag
changes anything. If the parameter value is not given in the Work object, we should use the default value of theParameter
. If it is given, then we just use that value, no? Because right now, for CHAMPSS, anyOption
we have withis_flag
and no default value (None) is just ignored, since the default value of None is not equal to the value we give it (True/False). Again don't quite understand that previous logic.