MCPcopy Create free account
hub / github.com/ipython/traitlets / _replace

Method _replace

traitlets/config/loader.py:935–943  ·  view source on GitHub ↗
(arg: str)

Source from the content-addressed store, hash-verified

933 unpacked_aliases["--" + al] = "--" + alias_target
934
935 def _replace(arg: str) -> str:
936 if arg == "-":
937 return _DASH_REPLACEMENT
938 for k, v in unpacked_aliases.items():
939 if arg == k:
940 return v
941 if arg.startswith(k + "="):
942 return v + "=" + arg[len(k) + 1 :]
943 return arg
944
945 if "--" in uargs:
946 idx = uargs.index("--")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected