Skip to content

Commit e5320e8

Browse files
authored
Upgrade ruff==0.13.3 pyright==1.1.406 (#790)
1 parent 2ff6426 commit e5320e8

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020

2121
- repo: https://github.com/astral-sh/ruff-pre-commit
2222
# Ruff version.
23-
rev: v0.13.1
23+
rev: v0.13.3
2424
hooks:
2525
# Run the linter.
2626
- id: ruff
@@ -44,7 +44,7 @@ repos:
4444
- tomli
4545

4646
- repo: https://github.com/RobertCraigie/pyright-python
47-
rev: v1.1.405
47+
rev: v1.1.406
4848
hooks:
4949
- id: pyright
5050
language: system

benchmarks/run.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import dataclasses
2727
import functools
2828
import gc
29-
import importlib
29+
import importlib.util
3030
import json
3131
import logging
3232
import os
@@ -39,16 +39,16 @@
3939
from typing import Any
4040
from typing import Callable
4141

42-
if TYPE_CHECKING:
43-
from tritonbench.utils.triton_op import BenchmarkOperator
44-
from tritonbench.utils.triton_op import BenchmarkOperatorMetrics
45-
4642
import torch
4743
from torch.utils._pytree import tree_leaves
4844
from torch.utils._pytree import tree_map
4945

5046
from helion._utils import counters
5147

48+
if TYPE_CHECKING:
49+
from tritonbench.utils.triton_op import BenchmarkOperator
50+
from tritonbench.utils.triton_op import BenchmarkOperatorMetrics
51+
5252
try:
5353
from tritonbench.utils.env_utils import get_nvidia_gpu_model
5454
from tritonbench.utils.env_utils import is_cuda
@@ -572,12 +572,8 @@ def get_system_memory_gb() -> float:
572572
def check_and_setup_tritonbench() -> None:
573573
"""Check if tritonbench is installed and install it from GitHub if not."""
574574
# Check if tritonbench is already installed
575-
try:
576-
import tritonbench # pyright: ignore[reportMissingImports]
577-
575+
if importlib.util.find_spec("tritonbench") is not None:
578576
return # Already installed
579-
except ImportError:
580-
pass
581577

582578
print("Tritonbench not found. Installing...", file=sys.stderr)
583579

lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
if [ "$ACTION" = "install" ];
1010
then
1111
set -ex
12-
pip install ruff==0.13.1 pyright==1.1.405
12+
pip install ruff==0.13.3 pyright==1.1.406
1313
exit 0
1414
fi
1515

0 commit comments

Comments
 (0)