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

Method normalize

tests/debug/session.py:385–394  ·  view source on GitHub ↗
(s, strip_quotes=False)

Source from the content-addressed store, hash-verified

383
384 def _make_python_cmdline(self, exe, *args):
385 def normalize(s, strip_quotes=False):
386 # Convert py.path.local to string
387 if isinstance(s, py.path.local):
388 s = s.strpath
389 else:
390 s = str(s)
391 # Strip surrounding quotes if requested
392 if strip_quotes and len(s) >= 2 and " " in s and (s[0] == s[-1] == '"' or s[0] == s[-1] == "'"):
393 s = s[1:-1]
394 return s
395
396 # Strip quotes from exe
397 result = [normalize(exe, strip_quotes=True)]

Callers 1

_request_startMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected