diff --git a/python/ruff-ecosystem/ruff_ecosystem/cli.py b/python/ruff-ecosystem/ruff_ecosystem/cli.py index b1ace28298..a9dc20b008 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/cli.py +++ b/python/ruff-ecosystem/ruff_ecosystem/cli.py @@ -50,7 +50,7 @@ def entrypoint(): ruff_comparison_executable=args.ruff_comparison, targets=DEFAULT_TARGETS, format=OutputFormat(args.output_format), - cache=Path(cache), + project_dir=Path(cache), raise_on_failure=args.pdb, ) ) diff --git a/python/ruff-ecosystem/ruff_ecosystem/main.py b/python/ruff-ecosystem/ruff_ecosystem/main.py index a152455dc4..b44a5caf34 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/main.py +++ b/python/ruff-ecosystem/ruff_ecosystem/main.py @@ -28,7 +28,7 @@ async def main( ruff_baseline_executable: Path, ruff_comparison_executable: Path, targets: list[Project], - cache: Path | None, + project_dir: Path, format: OutputFormat, max_parallelism: int = 50, raise_on_failure: bool = False, @@ -36,7 +36,7 @@ async def main( logger.debug("Using command %s", command.value) logger.debug("Using baseline executable at %s", ruff_baseline_executable) logger.debug("Using comparison executable at %s", ruff_comparison_executable) - logger.debug("Using cache directory %s", cache) + logger.debug("Using checkout_dir directory %s", project_dir) logger.debug("Checking %s targets", len(targets)) # Limit parallelism to avoid high memory consumption @@ -54,7 +54,7 @@ async def main( ruff_baseline_executable, ruff_comparison_executable, target, - cache, + project_dir, ) ) for target in targets @@ -95,7 +95,7 @@ async def clone_and_compare( ruff_baseline_executable: Path, ruff_comparison_executable: Path, target: Project, - cache: Path, + project_dir: Path, ) -> Comparison: """Check a specific repository against two versions of ruff.""" assert ":" not in target.repo.owner @@ -115,7 +115,7 @@ async def clone_and_compare( case _: raise ValueError(f"Unknown target Ruff command {command}") - checkout_dir = cache.joinpath(f"{target.repo.owner}:{target.repo.name}") + checkout_dir = project_dir.joinpath(f"{target.repo.owner}:{target.repo.name}") cloned_repo = await target.repo.clone(checkout_dir) try: diff --git a/python/ruff-ecosystem/ruff_ecosystem/projects.py b/python/ruff-ecosystem/ruff_ecosystem/projects.py index 19f92dd176..651b20a035 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/projects.py +++ b/python/ruff-ecosystem/ruff_ecosystem/projects.py @@ -55,9 +55,7 @@ class Repository(Serializable): def url(self: Self) -> str: return f"https://github.com/{self.owner}/{self.name}" - async def clone( - self: Self, checkout_dir: Path - ) -> AsyncGenerator[ClonedRepository, None]: + async def clone(self: Self, checkout_dir: Path) -> ClonedRepository: """ Shallow clone this repository """