MCPcopy Index your code
hub / github.com/RustPython/RustPython / _lib_prefix_stripped

Function _lib_prefix_stripped

scripts/update_lib/deps.py:1176–1179  ·  view source on GitHub ↗

Get the normalized prefix to strip from paths, with trailing /.

(lib_prefix: str)

Source from the content-addressed store, hash-verified

1174
1175@functools.cache
1176def _lib_prefix_stripped(lib_prefix: str) -> str:
1177 """Get the normalized prefix to strip from paths, with trailing /."""
1178 # e.g. "Lib" -> "Lib/", "./Lib" -> "Lib/", "../Lib" -> "../Lib/"
1179 return pathlib.Path(lib_prefix).as_posix().rstrip("/") + "/"
1180
1181
1182def _lookup_last_updated(paths: list[str], lib_prefix: str) -> str | None:

Callers 1

_lookup_last_updatedFunction · 0.85

Calls 2

as_posixMethod · 0.80
rstripMethod · 0.45

Tested by

no test coverage detected