MCPcopy
hub / github.com/huggingface/datasets / resolver

Function resolver

tests/test_data_files.py:666–672  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

664 fs = DummyTestFS()
665
666 def resolver(pattern):
667 pattern = base_path + ("/" if base_path and base_path[-1] != "/" else "") + pattern
668 return [
669 file_path[len(fs._strip_protocol(base_path)) :].lstrip("/")
670 for file_path in fs.glob(pattern)
671 if fs.isfile(file_path)
672 ]
673
674 patterns_per_split = _get_data_files_patterns(resolver)
675 assert list(patterns_per_split.keys()) == list(data_file_per_split.keys()) # Test split order with list()

Callers 1

Calls 2

globMethod · 0.80
_strip_protocolMethod · 0.45

Tested by

no test coverage detected