Skip to content

Commit 42d25e1

Browse files
committed
new: typecheck more tests
1 parent 680004b commit 42d25e1

File tree

7 files changed

+73
-59
lines changed

7 files changed

+73
-59
lines changed

.mypy.ini

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ ignore_errors = True
1818
[mypy-valkey._cache]
1919
ignore_errors = True
2020

21-
2221
[mypy-tests.*]
2322
ignore_errors = True
24-
2523
[mypy-tests.test_commands]
2624
ignore_errors = False
2725
[mypy-tests.test_asyncio.test_commands]
2826
ignore_errors = False
27+
[mypy-tests.test_pipeline]
28+
ignore_errors = False
29+
[mypy-tests.test_asyncio.test_pipeline]
30+
ignore_errors = False
31+
[mypy-tests.test_pubsub]
32+
ignore_errors = False
33+
[mypy-tests.test_asyncio.test_pubsub]
34+
ignore_errors = False
2935

3036
[mypy-benchmarks.*]
3137
ignore_errors = True

tests/test_asyncio/compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import asyncio
22
from unittest import mock
33

4+
__all__ = ["mock", "aclosing", "create_task"]
5+
46
try:
57
mock.AsyncMock
68
except AttributeError:

tests/test_asyncio/test_pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import pytest
24
import valkey
35
from tests.conftest import skip_if_server_version_lt
@@ -308,7 +310,7 @@ async def test_aclosing(self, r):
308310
async def test_transaction_callable(self, r):
309311
await r.set("a", 1)
310312
await r.set("b", 2)
311-
has_run = []
313+
has_run: list[str] = []
312314

313315
async def my_transaction(pipe):
314316
a_value = await pipe.get("a")

0 commit comments

Comments
 (0)