Skip to content

Commit

Permalink
fix qtype for different python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Apr 11, 2024
1 parent ce1a24a commit 5a1fc4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qlasskit/types/qtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
else:
from typing import TypeAlias

TType: TypeAlias = Union[type[bool], type["Qtype"]]
if sys.version_info >= (3, 9):
from builtins import type as Type
else:
from typing import Type

TType: TypeAlias = Union[Type[bool], Type["Qtype"]]
TExp: TypeAlias = Tuple[TType, Boolean]

T = TypeVar("T")
Expand Down

0 comments on commit 5a1fc4d

Please sign in to comment.