Skip to content

Commit

Permalink
refactor: revert addition of type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Aug 29, 2024
1 parent c9fc2ef commit 86600c7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import tempfile
from collections import OrderedDict
from pathlib import Path
from typing import Generator

import git
import pyperclip
Expand Down Expand Up @@ -528,16 +527,16 @@ def glob_filtered_to_repo(self, pattern):
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)

Expand Down Expand Up @@ -1079,7 +1078,7 @@ def cmd_settings(self, args):
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
Expand Down

0 comments on commit 86600c7

Please sign in to comment.