Skip to content

Commit bf9380c

Browse files
committed
ruff check / format
1 parent ad90c2d commit bf9380c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

codeflash/benchmarking/plugin/plugin.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
if TYPE_CHECKING:
1717
from codeflash.models.models import BenchmarkKey
1818

19-
try:
20-
import pytest_benchmark
21-
22-
PYTEST_BENCHMARK_INSTALLED = True
23-
except ImportError:
24-
PYTEST_BENCHMARK_INSTALLED = False
19+
PYTEST_BENCHMARK_INSTALLED = importlib.util.find_spec("pytest_benchmark") is not None
2520

2621

2722
class CodeFlashBenchmarkPlugin:
@@ -337,5 +332,5 @@ def benchmark(request: pytest.FixtureRequest) -> object:
337332
**dict(bs.options, **options),
338333
)
339334
return lambda func, *args, **kwargs: func(*args, **kwargs)
340-
335+
341336
return lambda func, *args, **kwargs: func(*args, **kwargs)

0 commit comments

Comments
 (0)