MCPcopy
hub / github.com/pallets/click / wrapper

Function wrapper

src/click/utils.py:40–45  ·  view source on GitHub ↗
(*args: P.args, **kwargs: P.kwargs)

Source from the content-addressed store, hash-verified

38 """Wraps a function so that it swallows exceptions."""
39
40 def wrapper(*args: P.args, **kwargs: P.kwargs) -> R | None:
41 try:
42 return func(*args, **kwargs)
43 except Exception:
44 pass
45 return None
46
47 return update_wrapper(wrapper, func)
48

Callers

nothing calls this directly

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected