Spaces:
Configuration error
Configuration error
Download openhands/resolver/patching/exceptions.py from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/openhands/resolver/patching/exceptions.py
- Command line
-
hf download hf://spaces/flyingdarkdev/README/openhands/resolver/patching/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/openhands/resolver/patching/exceptions.py
770 Bytes
| class PatchingException(Exception): | |
| pass | |
| class HunkException(PatchingException): | |
| def __init__(self, msg: str, hunk: int | None = None) -> None: | |
| self.hunk = hunk | |
| if hunk is not None: | |
| super(HunkException, self).__init__( | |
| '{msg}, in hunk #{n}'.format(msg=msg, n=hunk) | |
| ) | |
| else: | |
| super(HunkException, self).__init__(msg) | |
| class ApplyException(PatchingException): | |
| pass | |
| class SubprocessException(ApplyException): | |
| def __init__(self, msg: str, code: int) -> None: | |
| super(SubprocessException, self).__init__(msg) | |
| self.code = code | |
| class HunkApplyException(HunkException, ApplyException, ValueError): | |
| pass | |
| class ParseException(HunkException, ValueError): | |
| pass | |