[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:
Anh-Dung Nguyen 2025-08-12 00:26:30 +03:00 committed by GitHub
parent d2fbf2af8f
commit e72f10be2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class Ty(Tool):
name: str
def __init__(self, *, path: Path | None = None):
self.name = str(path) or "ty"
self.name = str(path) if path else "ty"
self.path = (
path or (Path(__file__) / "../../../../../target/release/ty")
).resolve()