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:
Martijn Pieters
2023-05-16 13:45:26 +01:00
committed by GitHub
parent 230c24a4e0
commit 23bb4e9cd4
2 changed files with 4 additions and 1 deletions

View File

@@ -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()