Datasets:
Download src/00015.py from BlazingCustoms/pybytecode-csn-3.12-licensed: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/resolve/main/src/00015.py
- Command line
-
hf download hf://datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/src/00015.py
-
curl -L -o 00015.py https://huggingface.co/datasets/BlazingCustoms/pybytecode-csn-3.12-licensed/resolve/main/src/00015.py
406 Bytes
| def patch(fn, attr_or_replacement, replacement=None): | |
| """pass""" | |
| if replacement is None: | |
| replacement = attr_or_replacement | |
| return when2(fn, Ellipsis).thenAnswer(replacement) | |
| else: | |
| obj, name = (fn, attr_or_replacement) | |
| theMock = _get_mock(obj, strict=True) | |
| return invocation.StubbedInvocation(theMock, name, strict=False)(Ellipsis).thenAnswer(replacement) |