-class InputSpec(NamedTuple):
- image_file_glob: Optional[str]
- image_file_prepopulated_list: Optional[List[str]]
- image_file_to_features_file: Callable[[str], str]
- label: str
- valid_keystrokes: List[str]
- prompt: str
- keystroke_to_label: Callable[[str], str]
+@dataclass
+class InputSpec:
+ """A wrapper around the input data we need to operate; should be
+ populated by the caller."""
+
+ image_file_glob: Optional[str] = None
+ image_file_prepopulated_list: Optional[List[str]] = None
+ image_file_to_features_file: Optional[Callable[[str], str]] = None
+ label: str = ''
+ valid_keystrokes: List[str] = []
+ prompt: str = ''
+ keystroke_to_label: Optional[Callable[[str], str]] = None