From 861f51f6c36322effb889e557cfaffb0e62e7558 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 14 Apr 2025 15:08:41 -0700 Subject: [PATCH] fix: Define EditResult after PatchAction to resolve flake8 error --- aider/coders/patch_coder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/coders/patch_coder.py b/aider/coders/patch_coder.py index c52156a1c..c6d18cab9 100644 --- a/aider/coders/patch_coder.py +++ b/aider/coders/patch_coder.py @@ -7,8 +7,6 @@ from ..dump import dump # noqa: F401 from .base_coder import Coder from .patch_prompts import PatchPrompts -EditResult = Tuple[str, PatchAction] - # --------------------------------------------------------------------------- # # Domain objects & Exceptions (Adapted from apply_patch.py) @@ -41,6 +39,10 @@ class PatchAction: move_path: Optional[str] = None +# Type alias for the return type of get_edits +EditResult = Tuple[str, PatchAction] + + @dataclass class Patch: actions: Dict[str, PatchAction] = field(default_factory=dict)