mirror of https://github.com/astral-sh/ruff
[ty] Fix tool name is None when no ty path is given in ty_benchmark (#19870)
## Summary When running the ty_benchmark, I found out that the Ty Tool name is None when no ty_path is given as str(None)='None' <img width="1011" height="168" alt="image" src="https://github.com/user-attachments/assets/cf3e6d98-2329-48e9-b180-c72e4f01ccb6" /> ## Test Plan Minor fix, tested local <img width="1105" height="218" alt="image" src="https://github.com/user-attachments/assets/173128c9-dcfa-49f1-a58d-1b39a6c6b53b" />
This commit is contained in:
parent
d2fbf2af8f
commit
e72f10be2d
|
|
@ -58,7 +58,7 @@ class Ty(Tool):
|
||||||
name: str
|
name: str
|
||||||
|
|
||||||
def __init__(self, *, path: Path | None = None):
|
def __init__(self, *, path: Path | None = None):
|
||||||
self.name = str(path) or "ty"
|
self.name = str(path) if path else "ty"
|
||||||
self.path = (
|
self.path = (
|
||||||
path or (Path(__file__) / "../../../../../target/release/ty")
|
path or (Path(__file__) / "../../../../../target/release/ty")
|
||||||
).resolve()
|
).resolve()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue