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

Function get_spontaneous_environment

tools/inspector_protocol/jinja2/environment.py:44–57  ·  view source on GitHub ↗

Return a new spontaneous environment. A spontaneous environment is an unnamed and unaccessible (in theory) environment that is used for templates generated from a string and not from the file system.

(*args)

Source from the content-addressed store, hash-verified

42
43
44def get_spontaneous_environment(*args):
45 """Return a new spontaneous environment. A spontaneous environment is an
46 unnamed and unaccessible (in theory) environment that is used for
47 templates generated from a string and not from the file system.
48 """
49 try:
50 env = _spontaneous_environments.get(args)
51 except TypeError:
52 return Environment(*args)
53 if env is not None:
54 return env
55 _spontaneous_environments[args] = env = Environment(*args)
56 env.shared = True
57 return env
58
59
60def create_cache(size):

Callers 1

__new__Method · 0.70

Calls 2

EnvironmentClass · 0.70
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…