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

Function _click_range

scenedetect/_cli/__init__.py:59–67  ·  view source on GitHub ↗

Return a `click` parameter type matching the `RangeValue` at `CONFIG_MAP[section][key]`. Used in `@click.option(... type=...)` decorators so each option's bounds and value type are sourced from the canonical `CONFIG_MAP` entry.

(section: str, key: str)

Source from the content-addressed store, hash-verified

57
58
59def _click_range(section: str, key: str) -> "click.IntRange | click.FloatRange":
60 """Return a `click` parameter type matching the `RangeValue` at `CONFIG_MAP[section][key]`.
61
62 Used in `@click.option(... type=...)` decorators so each option's bounds and value type are
63 sourced from the canonical `CONFIG_MAP` entry.
64 """
65 val = CONFIG_MAP[section][key]
66 assert isinstance(val, RangeValue), f"Expected RangeValue at {section}/{key}, got {type(val)}"
67 return val.click_range
68
69
70# About & copyright message string shown for the 'about' CLI command (scenedetect about).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected