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

Method __init__

scenedetect/_cli/config.py:236–248  ·  view source on GitHub ↗
(self, value: int)

Source from the content-addressed store, hash-verified

234 """Validator for kernel sizes (odd integer > 1, or -1 for auto size)."""
235
236 def __init__(self, value: int):
237 self._value: int | None
238 if value == -1:
239 # Kernel size of -1 maps to None internally for auto-sized kernel.
240 self._value = None
241 elif value < 0:
242 # Disallow other negative values.
243 raise ValueError()
244 elif value % 2 == 0:
245 # Disallow even values.
246 raise ValueError()
247 else:
248 self._value = value
249
250 @property
251 def value(self) -> int | None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected