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

Function is_lib_path

scripts/update_lib/file_utils.py:75–78  ·  view source on GitHub ↗

Check if path starts with Lib/

(path: pathlib.Path)

Source from the content-addressed store, hash-verified

73
74
75def is_lib_path(path: pathlib.Path) -> bool:
76 """Check if path starts with Lib/"""
77 path_str = str(path).replace("\\", "/")
78 return path_str.startswith("Lib/") or path_str.startswith("./Lib/")
79
80
81def is_test_path(path: pathlib.Path) -> bool:

Callers 5

quickFunction · 0.90
mainFunction · 0.90
test_lib_pathMethod · 0.90

Calls 3

strFunction · 0.85
replaceMethod · 0.45
startswithMethod · 0.45

Tested by 3

test_lib_pathMethod · 0.72