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

Function _dircmp_is_same

scripts/update_lib/file_utils.py:221–230  ·  view source on GitHub ↗

Recursively check if two directories are identical.

(dcmp: filecmp.dircmp)

Source from the content-addressed store, hash-verified

219
220
221def _dircmp_is_same(dcmp: filecmp.dircmp) -> bool:
222 """Recursively check if two directories are identical."""
223 if dcmp.diff_files or dcmp.left_only or dcmp.right_only:
224 return False
225
226 for subdir in dcmp.subdirs.values():
227 if not _dircmp_is_same(subdir):
228 return False
229
230 return True
231
232
233def compare_paths(cpython_path: pathlib.Path, local_path: pathlib.Path) -> bool:

Callers 5

compare_pathsFunction · 0.85
test_different_filesMethod · 0.85
test_nested_identicalMethod · 0.85
test_nested_differentMethod · 0.85

Calls 1

valuesMethod · 0.45

Tested by 4

test_different_filesMethod · 0.68
test_nested_identicalMethod · 0.68
test_nested_differentMethod · 0.68