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

Function is_path_synced

scripts/update_lib/deps.py:1027–1045  ·  view source on GitHub ↗

Check if a CPython path is synced with local. Args: cpython_path: Path in CPython directory cpython_prefix: CPython directory prefix lib_prefix: Local Lib directory prefix Returns: True if synced, False otherwise

(
    cpython_path: pathlib.Path,
    cpython_prefix: str,
    lib_prefix: str,
)

Source from the content-addressed store, hash-verified

1025
1026
1027def is_path_synced(
1028 cpython_path: pathlib.Path,
1029 cpython_prefix: str,
1030 lib_prefix: str,
1031) -> bool:
1032 """Check if a CPython path is synced with local.
1033
1034 Args:
1035 cpython_path: Path in CPython directory
1036 cpython_prefix: CPython directory prefix
1037 lib_prefix: Local Lib directory prefix
1038
1039 Returns:
1040 True if synced, False otherwise
1041 """
1042 local_path = cpython_to_local_path(cpython_path, cpython_prefix, lib_prefix)
1043 if local_path is None:
1044 return False
1045 return compare_paths(cpython_path, local_path)
1046
1047
1048@functools.cache

Callers 1

format_depsFunction · 0.90

Calls 2

cpython_to_local_pathFunction · 0.90
compare_pathsFunction · 0.90

Tested by

no test coverage detected