Skip to content

Commit 8250ec4

Browse files
committed
Changes after the best man in the world review
1 parent de04b8f commit 8250ec4

File tree

7 files changed

+29
-7
lines changed

7 files changed

+29
-7
lines changed
File renamed without changes.

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "taskiq-redis"
33
version = "0.1.0"
44
description = ""
55
authors = ["taskiq-team"]
6+
packages = [{ include = "taskiq", from = "taskiq_redis" }]
67

78
[tool.poetry.dependencies]
89
python = "^3.7"
@@ -25,6 +26,27 @@ anyio = "^3.6.1"
2526
pytest-env = "^0.6.2"
2627
fakeredis = "^1.8.1"
2728

29+
[tool.mypy]
30+
strict = true
31+
ignore_missing_imports = true
32+
allow_subclassing_any = true
33+
allow_untyped_calls = true
34+
pretty = true
35+
show_error_codes = true
36+
implicit_reexport = true
37+
allow_untyped_decorators = true
38+
warn_return_any = false
39+
40+
[[tool.mypy.overrides]]
41+
module = [
42+
'redis.asyncio'
43+
]
44+
ignore_missing_imports = true
45+
46+
[tool.isort]
47+
profile = "black"
48+
multi_line_output = 3
49+
2850
[build-system]
2951
requires = ["poetry-core>=1.0.0"]
3052
build-backend = "poetry.core.masonry.api"

taskiq-redis/taskiq/result_backend/errors/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

taskiq-redis/taskiq/result_backend/redis_backend.py renamed to taskiq/result_backend/redis/redis_backend.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import pickle
22
from typing import Any, Dict, TypeVar
33

4-
from redis_client import RedisClient # type: ignore
5-
from taskiq import AsyncResultBackend
4+
from redis_client import RedisClient
65
from taskiq.abc.result_backend import TaskiqResult
76

7+
from taskiq import AsyncResultBackend
8+
89
_ReturnType = TypeVar("_ReturnType")
910

1011

11-
class RedisAsyncResultBackend(AsyncResultBackend):
12+
class RedisAsyncResultBackend(AsyncResultBackend[_ReturnType]):
1213
"""Async result based on redis."""
1314

1415
def __init__(self, redis_url: str):

taskiq-redis/taskiq/result_backend/redis_client.py renamed to taskiq/result_backend/redis/redis_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Mapping, Optional, Union
22

3-
from errors.redis_errors import RedisConnectionError # type: ignore
3+
from errors import RedisConnectionError
44
from redis.asyncio import Redis
55

66

@@ -13,9 +13,9 @@ def __init__(self, redis_url: str) -> None:
1313
1414
:param redis_url: Redis URL to connect.
1515
"""
16-
self.redis_client: Redis = Redis.from_url(redis_url)
16+
self.redis_client = Redis.from_url(redis_url)
1717

18-
async def close(self):
18+
async def close(self) -> None:
1919
"""Closes redis connection."""
2020
await self.redis_client.close()
2121

0 commit comments

Comments
 (0)