Skip to content

Commit 3c79cb1

Browse files
committed
Fix mypy 1.15 "unused type: ignore" errors
It looks like mypy correctly detects these @given items as the appropriate type, so we can remove the type: ignore and add annotations.
1 parent cc32669 commit 3c79cb1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/integration/backend_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,11 @@ def test_leakage_detection(
530530

531531

532532
@given(
533-
n_shots=st.integers(min_value=1, max_value=10), # type: ignore
533+
n_shots=st.integers(min_value=1, max_value=10),
534534
n_bits=st.integers(min_value=0, max_value=10),
535535
)
536536
@pytest.mark.timeout(120)
537-
def test_shots_bits_edgecases(n_shots, n_bits) -> None:
537+
def test_shots_bits_edgecases(n_shots: int, n_bits: int) -> None:
538538
quantinuum_backend = QuantinuumBackend("H1-1SC", machine_debug=True)
539539
c = Circuit(n_bits, n_bits)
540540

tests/unit/offline_backend_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_tket_pass_submission(language: Language) -> None:
117117

118118

119119
@given(
120-
n_shots=strategies.integers(min_value=1, max_value=10), # type: ignore
120+
n_shots=strategies.integers(min_value=1, max_value=10),
121121
n_bits=strategies.integers(min_value=0, max_value=10),
122122
)
123123
@pytest.mark.parametrize(
@@ -128,7 +128,7 @@ def test_tket_pass_submission(language: Language) -> None:
128128
Language.PQIR,
129129
],
130130
)
131-
def test_shots_bits_edgecases(n_shots, n_bits, language: Language) -> None:
131+
def test_shots_bits_edgecases(n_shots: int, n_bits: int, language: Language) -> None:
132132
quantinuum_backend = QuantinuumBackend("H1-1SC", machine_debug=True)
133133
c = Circuit(n_bits, n_bits)
134134

0 commit comments

Comments
 (0)