MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / ValidatedValue

Class ValidatedValue

scenedetect/_cli/config.py:49–72  ·  view source on GitHub ↗

Used to represent configuration values that must be validated against constraints.

Source from the content-addressed store, hash-verified

47
48
49class ValidatedValue(ABC):
50 """Used to represent configuration values that must be validated against constraints."""
51
52 @property
53 @abstractmethod
54 def value(self) -> ty.Any:
55 """Get the value after validation."""
56 ...
57
58 @staticmethod
59 @abstractmethod
60 def from_config(config_value: str, default: "ValidatedValue") -> "ValidatedValue":
61 """Validate and get the user-specified configuration option.
62
63 Raises:
64 OptionParseFailure: Value from config file did not meet validation constraints.
65 """
66 ...
67
68 def __repr__(self) -> str:
69 return str(self.value)
70
71 def __str__(self) -> str:
72 return str(self.value)
73
74
75class TimecodeValue(ValidatedValue):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected