mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Improve test file filtering logic in blame script
This commit is contained in:
parent
3f80a113d1
commit
2425322e8d
1 changed files with 5 additions and 2 deletions
|
@ -32,15 +32,18 @@ def blame(start_tag, end_tag=None):
|
||||||
|
|
||||||
revision = end_tag if end_tag else "HEAD"
|
revision = end_tag if end_tag else "HEAD"
|
||||||
files = run(["git", "ls-tree", "-r", "--name-only", revision]).strip().split("\n")
|
files = run(["git", "ls-tree", "-r", "--name-only", revision]).strip().split("\n")
|
||||||
|
test_files = [
|
||||||
|
f for f in files
|
||||||
|
if f.startswith("tests/fixtures/languages/") and "/test." in f
|
||||||
|
]
|
||||||
files = [
|
files = [
|
||||||
f
|
f
|
||||||
for f in files
|
for f in files
|
||||||
if f.endswith((".js", ".py", ".scm", ".sh", "Dockerfile", "Gemfile"))
|
if f.endswith((".js", ".py", ".scm", ".sh", "Dockerfile", "Gemfile"))
|
||||||
or (f.startswith(".github/workflows/") and f.endswith(".yml"))
|
or (f.startswith(".github/workflows/") and f.endswith(".yml"))
|
||||||
or f in website_files
|
or f in website_files
|
||||||
|
or f in test_files
|
||||||
]
|
]
|
||||||
# Include all language test files
|
|
||||||
files.extend(f for f in files if f.startswith("tests/fixtures/languages/") and "/test." in f)
|
|
||||||
files = [f for f in files if not f.endswith("prompts.py")]
|
files = [f for f in files if not f.endswith("prompts.py")]
|
||||||
files = [f for f in files if not f.startswith("tests/fixtures/watch")]
|
files = [f for f in files if not f.startswith("tests/fixtures/watch")]
|
||||||
files = [f for f in files if f not in exclude_files]
|
files = [f for f in files if f not in exclude_files]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue