Skip to content

Commit

Permalink
Fixes in repomap.py so that aider-swe-bench works (from Aider-AI/aide…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim White committed Jan 12, 2025
1 parent ac26fc6 commit 874fdf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aider/repomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def get_tags_raw(self, fname, rel_fname):
return

query_scm = get_scm_fname(lang)
if not query_scm.exists():
if (query_scm is None) or not query_scm.exists():
return
query_scm = query_scm.read_text()

Expand Down Expand Up @@ -734,7 +734,7 @@ def get_scm_fname(lang):
# Load the tags queries
try:
return resources.files(__package__).joinpath("queries", f"tree-sitter-{lang}-tags.scm")
except KeyError:
except (KeyError, TypeError):
return


Expand All @@ -749,7 +749,7 @@ def get_supported_languages_md():

for lang, ext in data:
fn = get_scm_fname(lang)
repo_map = "✓" if Path(fn).exists() else ""
repo_map = "✓" if (fn is not None) and Path(fn).exists() else ""
linter_support = "✓"
res += f"| {lang:20} | {ext:20} | {repo_map:^8} | {linter_support:^6} |\n"

Expand Down

0 comments on commit 874fdf8

Please sign in to comment.