MCPcopy Create free account
hub / github.com/microsoft/debugpy / prepend_to

Method prepend_to

tests/debug/config.py:222–230  ·  view source on GitHub ↗

Prepends a new entry to a PATH-style environment variable, creating it if it doesn't exist already.

(self, key, entry)

Source from the content-addressed store, hash-verified

220 return dict(self)
221
222 def prepend_to(self, key, entry):
223 """Prepends a new entry to a PATH-style environment variable, creating
224 it if it doesn't exist already.
225 """
226 try:
227 tail = os.path.pathsep + self[key]
228 except KeyError:
229 tail = ""
230 self[key] = entry + tail
231
232 class DebugOptions(MutableSet):
233 """Wraps config["debugOptions"], automatically creating and destroying it as

Callers 3

cliMethod · 0.45
_make_envMethod · 0.45
request_launchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected