def get_overide_object_from_user(): invalid_input = True while invalid_input: print( "Overide options are: A number between 0.0 and 1.0 that we multiply the natural position by," ) print(" or one of the following special values %s" % override_dict) value = input("Your value?") value = float(value) try: override_object = Override.from_numeric_value(value) return override_object except Exception as e: print(e)
def _from_dict_to_override(result_dict: dict) -> Override: value = result_dict[OVERRIDE_VALUE] override = Override.from_numeric_value(value) return override