MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / add_hidden_alias

Function add_hidden_alias

scenedetect/_cli/__init__.py:392–398  ·  view source on GitHub ↗

Adds a copy of `command` that can be invoked under the name `alias`.

(command: click.Command, alias: str)

Source from the content-addressed store, hash-verified

390
391
392def add_hidden_alias(command: click.Command, alias: str):
393 """Adds a copy of `command` that can be invoked under the name `alias`."""
394 # Shallow copy: deepcopy fails on Python 3.10 + click >=8.3 because click's internal
395 # `Sentinel` enum values are not deepcopy-safe.
396 hidden_command = copy(command)
397 hidden_command.hidden = True
398 scenedetect.add_command(hidden_command, alias)
399
400
401@click.command("help", cls=Command)

Callers 1

__init__.pyFile · 0.85

Calls 1

add_commandMethod · 0.80

Tested by

no test coverage detected