Skip to content

Commit 76cf6c2

Browse files
lesnik512claude
andcommitted
test(circuit_breaker): suppress A004 for intentional TimeoutError import shadow
httpware.TimeoutError deliberately shadows the Python builtin (noqa A001 at the definition site). Tests importing it need noqa A004 at the import line. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6eebd83 commit 76cf6c2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/test_circuit_breaker.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
NotFoundError,
2222
RateLimitedError,
2323
ServiceUnavailableError,
24-
TimeoutError,
24+
TimeoutError, # noqa: A004 — intentional: httpware.TimeoutError shadows the builtin
2525
)
2626
from httpware.middleware.resilience.circuit_breaker import AsyncCircuitBreaker
2727

@@ -171,7 +171,7 @@ def _raise(request: httpx2.Request) -> httpx2.Response: # noqa: ARG001
171171

172172

173173
async def test_timeout_error_counts_as_failure() -> None:
174-
def _raise(request: httpx2.Request) -> httpx2.Response: # noqa: ARG001
174+
def _raise(request: httpx2.Request) -> httpx2.Response:
175175
msg = "read timed out"
176176
raise httpx2.ReadTimeout(msg, request=request)
177177

‎tests/test_circuit_breaker_sync.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
NotFoundError,
1717
RateLimitedError,
1818
ServiceUnavailableError,
19-
TimeoutError,
19+
TimeoutError, # noqa: A004 — intentional: httpware.TimeoutError shadows the builtin
2020
)
2121
from httpware.middleware.resilience.circuit_breaker import CircuitBreaker
2222

0 commit comments

Comments
 (0)