diff --git a/src/apify/storage_clients/_file_system/_key_value_store_client.py b/src/apify/storage_clients/_file_system/_key_value_store_client.py index 4a74e073..c21b8bd2 100644 --- a/src/apify/storage_clients/_file_system/_key_value_store_client.py +++ b/src/apify/storage_clients/_file_system/_key_value_store_client.py @@ -61,7 +61,7 @@ async def open( key=configuration.input_key, record_path=input_file_path ) - return client # ty: ignore[invalid-return-type] + return client @override async def purge(self) -> None: diff --git a/tests/unit/actor/test_actor_lifecycle.py b/tests/unit/actor/test_actor_lifecycle.py index 0d5b9277..5f03c788 100644 --- a/tests/unit/actor/test_actor_lifecycle.py +++ b/tests/unit/actor/test_actor_lifecycle.py @@ -233,7 +233,7 @@ async def handler(websocket: websockets.asyncio.server.ServerConnection) -> None await websocket.wait_closed() async with websockets.asyncio.server.serve(handler, host='localhost') as ws_server: - port: int = ws_server.sockets[0].getsockname()[1] # ty: ignore[not-subscriptable] + port: int = ws_server.sockets[0].getsockname()[1] monkeypatch.setenv(ActorEnvVars.EVENTS_WEBSOCKET_URL, f'ws://localhost:{port}') mock_run_client = Mock() diff --git a/tests/unit/events/test_apify_event_manager.py b/tests/unit/events/test_apify_event_manager.py index 623ad63c..129c15c3 100644 --- a/tests/unit/events/test_apify_event_manager.py +++ b/tests/unit/events/test_apify_event_manager.py @@ -148,7 +148,7 @@ async def handler(websocket: websockets.asyncio.server.ServerConnection) -> None async with websockets.asyncio.server.serve(handler, host='localhost') as ws_server: # When you don't specify a port explicitly, the websocket connection is opened on a random free port. # We need to find out which port is that. - port: int = ws_server.sockets[0].getsockname()[1] # ty: ignore[not-subscriptable] + port: int = ws_server.sockets[0].getsockname()[1] monkeypatch.setenv(ActorEnvVars.EVENTS_WEBSOCKET_URL, f'ws://localhost:{port}') async with ApifyEventManager(Configuration.get_global_configuration()): @@ -175,7 +175,7 @@ async def send_platform_event(event_name: Event, data: Any = None) -> None: async with websockets.asyncio.server.serve(handler, host='localhost') as ws_server: # When you don't specify a port explicitly, the websocket connection is opened on a random free port. # We need to find out which port is that. - port: int = ws_server.sockets[0].getsockname()[1] # ty: ignore[not-subscriptable] + port: int = ws_server.sockets[0].getsockname()[1] monkeypatch.setenv(ActorEnvVars.EVENTS_WEBSOCKET_URL, f'ws://localhost:{port}') dummy_system_info = {