MCPcopy Index your code
hub / github.com/nodejs/node / from_code

Method from_code

tools/inspector_protocol/jinja2/environment.py:948–959  ·  view source on GitHub ↗

Creates a template object from compiled code and the globals. This is used by the loaders and environment to create a template object.

(cls, environment, code, globals, uptodate=None)

Source from the content-addressed store, hash-verified

946
947 @classmethod
948 def from_code(cls, environment, code, globals, uptodate=None):
949 """Creates a template object from compiled code and the globals. This
950 is used by the loaders and environment to create a template object.
951 """
952 namespace = {
953 'environment': environment,
954 '__file__': code.co_filename
955 }
956 exec(code, namespace)
957 rv = cls._from_namespace(environment, namespace, globals)
958 rv._uptodate = uptodate
959 return rv
960
961 @classmethod
962 def from_module_dict(cls, environment, module_dict, globals):

Callers 2

loadMethod · 0.45
from_stringMethod · 0.45

Calls 2

execFunction · 0.50
_from_namespaceMethod · 0.45

Tested by

no test coverage detected