Validates that 'value' is an instance of `str`.
(option: str, value: Any)
| 247 | |
| 248 | |
| 249 | def validate_string(option: str, value: Any) -> str: |
| 250 | """Validates that 'value' is an instance of `str`.""" |
| 251 | if isinstance(value, str): |
| 252 | return value |
| 253 | raise TypeError(f"Wrong type for {option}, value must be an instance of str, not {type(value)}") |
| 254 | |
| 255 | |
| 256 | def validate_string_or_none(option: str, value: Any) -> Optional[str]: |
no outgoing calls
no test coverage detected