Skip to content

Commit dcf7b84

Browse files
committed
🚨 fix typing in tests
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
1 parent 1efa22d commit dcf7b84

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/python/test_subarchitectures.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
"""Test subarchitecture generation."""
22

3+
from __future__ import annotations
4+
5+
import contextlib
36
from pathlib import Path
7+
from typing import TYPE_CHECKING, Optional
48

59
import pytest
610
import rustworkx as rx
711
from qiskit.providers.fake_provider import FakeLondon
812

913
from mqt.qmap import Architecture
1014
from mqt.qmap.subarchitectures import (
11-
Graph,
1215
SubarchitectureOrder,
1316
ibm_guadalupe_subarchitectures,
1417
rigetti_16_subarchitectures,
1518
)
1619

20+
if TYPE_CHECKING:
21+
from typing_extensions import TypeAlias
22+
23+
with contextlib.suppress(TypeError):
24+
Graph: TypeAlias = rx.PyGraph[int, Optional[int]]
25+
1726

1827
@pytest.fixture()
1928
def ibm_guadalupe() -> SubarchitectureOrder:

0 commit comments

Comments
 (0)