Skip to content

Commit

Permalink
Tamed mypy, aclose is definitely a Redis method, so not sure why it i…
Browse files Browse the repository at this point in the history
…sn't recognized, we use types-redis
  • Loading branch information
euri10 committed Feb 14, 2024
1 parent 545fe54 commit 77ac9c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion litestar/stores/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(

async def _shutdown(self) -> None:
if self.handle_client_shutdown:
await self._redis.aclose(close_connection_pool=True)
await self._redis.aclose(close_connection_pool=True) # type: ignore[attr-defined]

async def __aexit__(
self,
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import string
from datetime import timedelta
from pathlib import Path
from typing import TYPE_CHECKING, cast
from typing import TYPE_CHECKING, cast, Iterator
from unittest.mock import MagicMock, Mock, patch

import msgspec
Expand Down Expand Up @@ -404,12 +404,12 @@ def anyio_backend() -> str:


@pytest.fixture(scope="session")
def app_settings_test():
def app_settings_test() -> AppSettings:
return AppSettings(debug=True)


@pytest.fixture(scope="session")
def app_test(app_settings_test: AppSettings):
def app_test(app_settings_test: AppSettings) -> Iterator[Litestar]:
app = get_app(app_settings_test)
yield app

Expand Down

0 comments on commit 77ac9c0

Please sign in to comment.