From a92ffe05b4bbd93d76531fc273d2d075480712cb Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 20 Oct 2026 15:38:30 -0700 Subject: [PATCH] test(router): annotate the retire test's locals as Final --- tests/unit/router_strategy/test_base_routing_strategy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/router_strategy/test_base_routing_strategy.py b/tests/unit/router_strategy/test_base_routing_strategy.py index 31863eb9fc9..19ff11dd3f6 100644 --- a/tests/unit/router_strategy/test_base_routing_strategy.py +++ b/tests/unit/router_strategy/test_base_routing_strategy.py @@ -1,6 +1,6 @@ import json import logging -from typing import Any, Dict, List, Optional, Set, Union +from typing import Any, Dict, Final, List, Optional, Set, Union import pytest @@ -171,10 +171,10 @@ async def test_push_refused_by_the_open_circuit_breaker_is_not_logged_as_an_erro @pytest.mark.asyncio async def test_an_increment_counted_after_retire_still_reaches_redis(): - server = TcpFakeServer(("127.0.0.1", 0), server_type="redis") + server: Final = TcpFakeServer(("127.0.0.1", 0), server_type="redis") threading.Thread(target=server.serve_forever, daemon=True).start() - redis_cache = RedisCache(host="127.0.0.1", port=server.server_address[1]) - strategy = BaseRoutingStrategy( + redis_cache: Final = RedisCache(host="127.0.0.1", port=server.server_address[1]) + strategy: Final = BaseRoutingStrategy( dual_cache=DualCache(redis_cache=redis_cache, in_memory_cache=InMemoryCache()), should_batch_redis_writes=True, default_sync_interval=60,