mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
Add pytest-style linting (#159)
This does mean we need to tell pyright that the init_cache auto-use fixture is still being used even though it now has a leading underscore.
This commit is contained in:
@@ -11,7 +11,7 @@ from fastapi_cache.backends.inmemory import InMemoryBackend
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def init_cache() -> Generator[Any, Any, None]:
|
||||
def _init_cache() -> Generator[Any, Any, None]: # pyright: ignore[reportUnusedFunction]
|
||||
FastAPICache.init(InMemoryBackend())
|
||||
yield
|
||||
FastAPICache.reset()
|
||||
|
||||
Reference in New Issue
Block a user