From 6b5d42f92ab49973d6dec4d92a0248cd903ce8f7 Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Sat, 28 Sep 2024 09:53:19 +0200 Subject: [PATCH] Fix typing issues --- tests/test_eventloop.py | 8 ++++---- tests/test_filter.py | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/test_eventloop.py b/tests/test_eventloop.py index 5f4317a..265f441 100644 --- a/tests/test_eventloop.py +++ b/tests/test_eventloop.py @@ -26,7 +26,7 @@ async def test_sleep(): @pytest.mark.asyncio(loop_scope="module") async def test_call_soon(): - result = [] + result: list[int] = [] def action(value: int) -> None: result.append(value) @@ -41,7 +41,7 @@ def action(value: int) -> None: @pytest.mark.asyncio(loop_scope="module") async def test_call_later(): - result = [] + result: list[int] = [] def action(value: int) -> None: result.append(value) @@ -56,7 +56,7 @@ def action(value: int) -> None: @pytest.mark.asyncio(loop_scope="module") async def test_call_at(): - result = [] + result: list[int] = [] def action(value: int) -> None: result.append(value) @@ -71,7 +71,7 @@ def action(value: int) -> None: @pytest.mark.asyncio(loop_scope="module") async def test_cancel(): - result = [] + result: list[int] = [] def action(value: int) -> None: result.append(value) diff --git a/tests/test_filter.py b/tests/test_filter.py index 83779e0..ee42a85 100644 --- a/tests/test_filter.py +++ b/tests/test_filter.py @@ -1,5 +1,4 @@ import asyncio -from typing import Any, Generator import pytest from expression.core import pipe @@ -24,7 +23,7 @@ def event_loop_policy(): @pytest.mark.asyncio(loop_scope="module") async def test_filter_happy() -> None: xs = rx.from_iterable([1, 2, 3]) - result = [] + result: list[int] = [] async def asend(value: int) -> None: result.append(value) @@ -43,7 +42,7 @@ async def predicate(value: int) -> bool: async def test_filter_predicate_throws() -> None: xs = rx.from_iterable([1, 2, 3]) err = MyException("err") - result = [] + result: list[int] = [] async def asend(value: int) -> None: result.append(value)