Skip to content

Commit 96d27c7

Browse files
committed
fix(tests): drop stale ty:ignore suppressions in circuit breaker tests
ty 0.0.59 no longer raises unresolved-attribute on caplog.records access here, leaving the suppression comments dead weight that ty check now flags (and fails on).
1 parent fee6fdc commit 96d27c7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_circuit_breaker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ async def test_reset_timeout_admits_probe_then_closes(caplog: pytest.LogCaptureF
311311
assert response.status_code == HTTPStatus.OK
312312
assert handler.calls == 3 # noqa: PLR2004 — 2 failures + 1 probe
313313
records = [r for r in caplog.records if r.name == "httpware.circuit_breaker"]
314-
assert any(r.event == "circuit.half_open" for r in records) # ty: ignore[unresolved-attribute]
315-
assert any(r.event == "circuit.closed" for r in records) # ty: ignore[unresolved-attribute]
314+
assert any(r.event == "circuit.half_open" for r in records)
315+
assert any(r.event == "circuit.closed" for r in records)
316316
messages = [r.message for r in records]
317317
assert any("half-open" in m for m in messages)
318318
assert any("closed" in m for m in messages)

tests/test_circuit_breaker_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ def test_reset_timeout_admits_probe_then_closes(caplog: pytest.LogCaptureFixture
214214
assert response.status_code == HTTPStatus.OK
215215
assert handler.calls == 3 # noqa: PLR2004
216216
records = [r for r in caplog.records if r.name == "httpware.circuit_breaker"]
217-
assert any(r.event == "circuit.half_open" for r in records) # ty: ignore[unresolved-attribute]
218-
assert any(r.event == "circuit.closed" for r in records) # ty: ignore[unresolved-attribute]
217+
assert any(r.event == "circuit.half_open" for r in records)
218+
assert any(r.event == "circuit.closed" for r in records)
219219
messages = [r.message for r in records]
220220
assert any("half-open" in m for m in messages)
221221
assert any("closed" in m for m in messages)

0 commit comments

Comments
 (0)