Skip to content

Commit

Permalink
Move type annotations to TYPE_CHECKING
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Feb 14, 2024
1 parent 14446c1 commit 59ea7ad
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pytest_codspeed/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pkgutil
import sys
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, ParamSpec, TypeVar
from typing import TYPE_CHECKING

import pytest
from _pytest.fixtures import FixtureManager
Expand All @@ -17,10 +17,13 @@
from ._wrapper import get_lib

if TYPE_CHECKING:
from typing import Any, Callable, Iterator
from typing import Any, Callable, Iterator, ParamSpec, TypeVar

from ._wrapper import LibType

T = TypeVar("T")
P = ParamSpec("P")

IS_PYTEST_BENCHMARK_INSTALLED = pkgutil.find_loader("pytest_benchmark") is not None
SUPPORTS_PERF_TRAMPOLINE = sys.version_info >= (3, 12)

Expand Down Expand Up @@ -165,10 +168,6 @@ def pytest_collection_modifyitems(
items[:] = selected


T = TypeVar("T")
P = ParamSpec("P")


def wrap_pyfunc_with_instrumentation(
lib: LibType,
nodeid: str,
Expand Down

0 comments on commit 59ea7ad

Please sign in to comment.