INNER CODE UNIT · Python
_parse_sensitivity
wiltodelta/remove-ai-watermarks · src/remove_ai_watermarks/cli.py:373
def _parse_sensitivity(value: str) -> watermark_registry.Sensitivity:
"""Map the CLI ``--sensitivity`` choice to the registry literal.
A pass-through since ``assume-ai`` was removed (2026-07-19); kept as the single
conversion point so a future kebab-cased choice has an obvious home.
"""
return "strict" if value == "strict" else "auto"
# Exit code for the standalone ``visible`` command when no visible mark was
# removed -- distinct from success (0) and a hard error (1) so a wrapping
# service can tell "nothing to do here" apart and surface guidance instead of
# re-serving the unchanged input as a finished result.
EXIT_NO_VISIBLE_MARK = 2
def _pixels_required(func: Callable[..., None]) -> Callable[..., None]:
"""Report a missing pixel stack as an install hint instead of a traceback.