# night light days converter
# --------------------------
-def nightlightdays_from_str(value: str) -> Tuple[int, Optional[str]]:
+def nightlightdays_from_str(value: str) -> Tuple[Optional[int], Optional[str]]:
return value_comment_from_str(
value,
lambda val:
opt_from_str(val, lambda v: int_from_str(v, minimum=0, maximum=7)), opt_str_from_str, comment_optional=True)
-def nightlightdays_to_str(value: Tuple[int, Optional[str]]) -> str:
+def nightlightdays_to_str(value: Tuple[Optional[int], Optional[str]]) -> str:
return value_comment_to_str(value, lambda val: opt_to_str(val, int_to_str), opt_str_to_str, comment_optional=True)