MCPcopy Create free account
hub / github.com/nodejs/node / call

Method call

tools/inspector_protocol/jinja2/sandbox.py:417–427  ·  view source on GitHub ↗

Call an object from sandboxed code.

(__self, __context, __obj, *args, **kwargs)

Source from the content-addressed store, hash-verified

415 return type(s)(rv)
416
417 def call(__self, __context, __obj, *args, **kwargs):
418 """Call an object from sandboxed code."""
419 fmt = inspect_format_method(__obj)
420 if fmt is not None:
421 return __self.format_string(fmt, args, kwargs)
422
423 # the double prefixes are to avoid double keyword argument
424 # errors when proxying the call.
425 if not __self.is_safe_callable(__obj):
426 raise SecurityError('%r is not safely callable' % (__obj,))
427 return __context.call(__obj, *args, **kwargs)
428
429
430class ImmutableSandboxedEnvironment(SandboxedEnvironment):

Callers

nothing calls this directly

Calls 4

SecurityErrorClass · 0.90
inspect_format_methodFunction · 0.70
format_stringMethod · 0.45
is_safe_callableMethod · 0.45

Tested by

no test coverage detected