Skip to content

Commit 44bedf5

Browse files
committed
support relative --ty-path in ty-benchmark
1 parent b5b6b65 commit 44bedf5

File tree

1 file changed

+2
-4
lines changed
  • scripts/ty_benchmark/src/benchmark

1 file changed

+2
-4
lines changed

scripts/ty_benchmark/src/benchmark/cases.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ class Ty(Tool):
5959

6060
def __init__(self, *, path: Path | None = None):
6161
self.name = str(path) or "ty"
62-
self.path = path or (
63-
(Path(__file__) / "../../../../../target/release/ty").resolve()
64-
)
62+
self.path = (path or (Path(__file__) / "../../../../../target/release/ty")).resolve()
6563

6664
assert self.path.is_file(), (
6765
f"ty not found at '{self.path}'. Run `cargo build --release --bin ty`."
@@ -73,7 +71,7 @@ def cold_command(self, project: Project, venv: Venv) -> Command:
7371
command.extend(["--python", str(venv.path)])
7472

7573
return Command(
76-
name="ty",
74+
name=self.name,
7775
command=command,
7876
)
7977

0 commit comments

Comments
 (0)