Convert formatting to use ruff instead of yapf + isort (#26247)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -5,8 +5,7 @@ import sys
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
from vllm.triton_utils.importing import (TritonLanguagePlaceholder,
|
||||
TritonPlaceholder)
|
||||
from vllm.triton_utils.importing import TritonLanguagePlaceholder, TritonPlaceholder
|
||||
|
||||
|
||||
def test_triton_placeholder_is_module():
|
||||
@@ -52,8 +51,7 @@ def test_triton_placeholder_decorators_with_args():
|
||||
def bar(x):
|
||||
return x
|
||||
|
||||
@triton.heuristics(
|
||||
{"BLOCK_SIZE": lambda args: 128 if args["x"] > 1024 else 64})
|
||||
@triton.heuristics({"BLOCK_SIZE": lambda args: 128 if args["x"] > 1024 else 64})
|
||||
def baz(x):
|
||||
return x
|
||||
|
||||
@@ -89,6 +87,7 @@ def test_no_triton_fallback():
|
||||
# mock triton not being installed
|
||||
with mock.patch.dict(sys.modules, {"triton": None}):
|
||||
from vllm.triton_utils import HAS_TRITON, tl, triton
|
||||
|
||||
assert HAS_TRITON is False
|
||||
assert triton.__class__.__name__ == "TritonPlaceholder"
|
||||
assert triton.language.__class__.__name__ == "TritonLanguagePlaceholder"
|
||||
|
||||
Reference in New Issue
Block a user