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

Function walk

Lib/test/test_importlib/resources/update-zips.py:43–50  ·  view source on GitHub ↗
(datapath)

Source from the content-addressed store, hash-verified

41
42
43def walk(datapath):
44 for dirpath, dirnames, filenames in os.walk(datapath):
45 with contextlib.suppress(ValueError):
46 dirnames.remove('__pycache__')
47 for filename in filenames:
48 res = pathlib.Path(dirpath) / filename
49 rel = res.relative_to(datapath)
50 yield res, rel
51
52
53__name__ == '__main__' and main()

Callers 1

generateFunction · 0.70

Calls 3

walkMethod · 0.45
removeMethod · 0.45
relative_toMethod · 0.45

Tested by

no test coverage detected