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

Method __init__

scenedetect/_cli/config.py:203–213  ·  view source on GitHub ↗
(self, value: str | ContentDetector.Components)

Source from the content-addressed store, hash-verified

201 """Characters to ignore."""
202
203 def __init__(self, value: str | ContentDetector.Components):
204 if isinstance(value, ContentDetector.Components):
205 self._value = value
206 else:
207 translation_table = str.maketrans(
208 {char: " " for char in ScoreWeightsValue._IGNORE_CHARS}
209 )
210 values = value.translate(translation_table).split()
211 if not len(values) == 4:
212 raise ValueError("Score weights must be specified as four numbers!")
213 self._value = ContentDetector.Components(*(float(val) for val in values))
214
215 @property
216 def value(self) -> ContentDetector.Components:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected