Skip to content

Commit

Permalink
Hide typing constructs behind TYPE_CHECKING guard (#7094)
Browse files Browse the repository at this point in the history
  • Loading branch information
gandhis1 authored Aug 7, 2024
1 parent 1177917 commit b9e6610
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions panel/io/profile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import io
import os
import re
Expand All @@ -8,15 +10,16 @@
from cProfile import Profile
from functools import wraps
from typing import (
Callable, Iterator, Literal, ParamSpec, TypeVar,
TYPE_CHECKING, Callable, Iterator, Literal, ParamSpec, TypeVar,
)

from ..config import config
from ..util import escape
from .state import state

_P = ParamSpec("_P")
_R = TypeVar("_R")
if TYPE_CHECKING:
_P = ParamSpec("_P")
_R = TypeVar("_R")

ProfilingEngine = Literal["pyinstrument", "snakeviz", "memray"]

Expand Down

0 comments on commit b9e6610

Please sign in to comment.