MCPcopy Create free account
hub / github.com/vercel/vercel / wrapper

Function wrapper

python/vercel-runtime/src/vercel_runtime/vc_init.py:265–282  ·  view source on GitHub ↗
(
            *args: object,
            sep: str = " ",
            end: str = "\n",
            file: TextIO | None = None,
            flush: bool = False,
        )

Source from the content-addressed store, hash-verified

263 def print_wrapper(func: Callable[..., None]) -> Callable[..., None]:
264 @functools.wraps(func)
265 def wrapper(
266 *args: object,
267 sep: str = " ",
268 end: str = "\n",
269 file: TextIO | None = None,
270 flush: bool = False,
271 ) -> None:
272 target = file if file is not None else sys.stdout
273 if target is not None and target in (
274 sys.stdout,
275 sys.stderr,
276 ):
277 target.write(sep.join(map(str, args)) + end)
278 if flush:
279 target.flush()
280 else:
281 # User specified a different file, use original print behavior
282 func(*args, sep=sep, end=end, file=file, flush=flush)
283
284 return wrapper
285

Callers

nothing calls this directly

Calls 6

send_messageFunction · 0.85
getMethod · 0.65
funcFunction · 0.50
writeMethod · 0.45
joinMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected