]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/blobdiff - wrpylib/wrvalidators.py
Create "Buttonleiste" with key_value_template.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrvalidators.py
index 3b0ae5f84156d130f0ba4aa916a44ebf85e7c9c4..2e5cd5e73d1eb328c7826185ded089733ce8b74c 100644 (file)
@@ -325,7 +325,7 @@ opt_tristate_german_converter = FromToConverter(opt_tristate_german_from_str, op
 # -------------------------------
 
 def opt_tristate_german_comment_from_str(value: str) -> Tuple[Optional[float], Optional[str]]:
-    """Ja, Nein or Teilweise, optionally with comment in parenthesis."""
+    """Ja, Nein or Teilweise, optionally with comment in parentheses."""
     return value_comment_from_str(value, opt_tristate_german_from_str, opt_str_from_str, True)
 
 
@@ -712,14 +712,14 @@ cachet_german_converter = FromToConverter(cachet_german_from_str, cachet_german_
 # 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)