mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
style: Run linter
This commit is contained in:
parent
3069db0cfd
commit
892fd5a6ef
1 changed files with 6 additions and 6 deletions
|
@ -244,28 +244,28 @@ def analyze_exercise_solutions(dirs=None, topn=None, copy_hard_set=False):
|
||||||
# Create hard set directory
|
# Create hard set directory
|
||||||
src_dir = Path("tmp.benchmarks/exercism")
|
src_dir = Path("tmp.benchmarks/exercism")
|
||||||
dst_dir = Path("tmp.benchmarks/exercism-hard-set")
|
dst_dir = Path("tmp.benchmarks/exercism-hard-set")
|
||||||
|
|
||||||
if dst_dir.exists():
|
if dst_dir.exists():
|
||||||
print(f"\nError: Destination directory {dst_dir} already exists")
|
print(f"\nError: Destination directory {dst_dir} already exists")
|
||||||
return
|
return
|
||||||
|
|
||||||
print(f"\nCopying hard set problems to {dst_dir}...")
|
print(f"\nCopying hard set problems to {dst_dir}...")
|
||||||
|
|
||||||
# Get the base names of hard set problems
|
# Get the base names of hard set problems
|
||||||
hard_set_bases = {exercise.split('/')[0] for exercise in hard_set}
|
hard_set_bases = {exercise.split("/")[0] for exercise in hard_set}
|
||||||
|
|
||||||
# Copy each hard set problem's directory
|
# Copy each hard set problem's directory
|
||||||
for lang_dir in src_dir.glob("*/exercises/practice"):
|
for lang_dir in src_dir.glob("*/exercises/practice"):
|
||||||
if not lang_dir.is_dir():
|
if not lang_dir.is_dir():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for problem_dir in lang_dir.glob("*"):
|
for problem_dir in lang_dir.glob("*"):
|
||||||
if problem_dir.name in hard_set_bases:
|
if problem_dir.name in hard_set_bases:
|
||||||
rel_path = problem_dir.relative_to(src_dir)
|
rel_path = problem_dir.relative_to(src_dir)
|
||||||
dst_path = dst_dir / rel_path
|
dst_path = dst_dir / rel_path
|
||||||
dst_path.parent.mkdir(parents=True, exist_ok=True)
|
dst_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
shutil.copytree(problem_dir, dst_path)
|
shutil.copytree(problem_dir, dst_path)
|
||||||
|
|
||||||
print("Done copying hard set problems")
|
print("Done copying hard set problems")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue