Instantiate and add `detector` to the processing pipeline.
(self, detector: type[SceneDetector], detector_args: dict[str, ty.Any])
| 117 | self.commands.append((command, command_args)) |
| 118 | |
| 119 | def add_detector(self, detector: type[SceneDetector], detector_args: dict[str, ty.Any]): |
| 120 | """Instantiate and add `detector` to the processing pipeline.""" |
| 121 | if self.load_scenes_input: |
| 122 | raise click.ClickException("The load-scenes command cannot be used with detectors.") |
| 123 | assert self.scene_manager is not None |
| 124 | logger.debug("Adding detector: %s(%s)", detector.__name__, detector_args) |
| 125 | self.scene_manager.add_detector(detector(**detector_args)) |
| 126 | |
| 127 | def ensure_detector(self): |
| 128 | """Ensures at least one detector has been instantiated, otherwise adds a default one.""" |
no outgoing calls
no test coverage detected