mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Enforce modern Python typing annotations with Ruff (#8296)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -6,11 +6,9 @@ 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)
|
||||
)
|
||||
super().__init__('{msg}, in hunk #{n}'.format(msg=msg, n=hunk))
|
||||
else:
|
||||
super(HunkException, self).__init__(msg)
|
||||
super().__init__(msg)
|
||||
|
||||
|
||||
class ApplyException(PatchingException):
|
||||
@@ -19,7 +17,7 @@ class ApplyException(PatchingException):
|
||||
|
||||
class SubprocessException(ApplyException):
|
||||
def __init__(self, msg: str, code: int) -> None:
|
||||
super(SubprocessException, self).__init__(msg)
|
||||
super().__init__(msg)
|
||||
self.code = code
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user