From 86600c70aa54d5c7de090117e6bc88965f06a02e Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:03:21 +0300 Subject: [PATCH] refactor: revert addition of type hints --- aider/commands.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 217a8c30c..7a73f5311 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -5,7 +5,6 @@ import sys import tempfile from collections import OrderedDict from pathlib import Path -from typing import Generator import git import pyperclip @@ -528,16 +527,16 @@ class Commands: try: if os.path.isabs(pattern): # Handle absolute paths - raw_matched_files: list[Path] = [Path(pattern)] + raw_matched_files = [Path(pattern)] else: - raw_matched_files: list[Path] = list( + raw_matched_files = list( Path(self.coder.root).glob(pattern) ) except ValueError as err: self.io.tool_error(f"Error matching {pattern}: {err}") - raw_matched_files: list[Path] = [] + raw_matched_files = [] - matched_files: list[Path] = [] + matched_files = [] for fn in raw_matched_files: matched_files += expand_subdir(fn) @@ -1079,7 +1078,7 @@ class Commands: self.io.tool_output(settings) -def expand_subdir(file_path: Path) -> Generator[Path, None, None]: +def expand_subdir(file_path): if file_path.is_file(): yield file_path return