MCPcopy
hub / github.com/psf/black / wrapped_func

Method wrapped_func

tests/test_black.py:2387–2392  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

2385 orig_func = black.Cache.get_file_data
2386
2387 def wrapped_func(path: Path) -> FileData:
2388 if path == cached:
2389 return orig_func(path)
2390 if path == cached_but_changed:
2391 return FileData(0.0, 0, "")
2392 raise AssertionError
2393
2394 with patch.object(black.Cache, "get_file_data", side_effect=wrapped_func):
2395 cache.write([cached, cached_but_changed])

Callers

nothing calls this directly

Calls 1

FileDataClass · 0.90

Tested by

no test coverage detected