diff --git a/docs/conf.py b/docs/conf.py index 4061b9e4..8dbed0c1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -113,6 +113,7 @@ def setup(app): nitpicky = True nitpick_ignore = [ ("py:class", "collections.abc.Generator"), + ("py:class", "collections.abc.Callable"), ("py:class", "pathlib.Path"), ("py:class", "flask.app.Flask"), ("py:class", "gptme.tools.python.T"), diff --git a/gptme/tools/base.py b/gptme/tools/base.py index 961a7dc2..55df2ab3 100644 --- a/gptme/tools/base.py +++ b/gptme/tools/base.py @@ -20,13 +20,7 @@ exclusive_mode = False -class ConfirmFunc(Protocol): - def __call__(self, msg: str) -> bool: ... - - -def ask_confirm(msg: str) -> bool: - """Asks the user for confirmation.""" - return input(f"{msg} [y/n] ").lower().startswith("y") +ConfirmFunc = Callable[[str], bool] class ExecuteFunc(Protocol):