WIP Add CI #1
@@ -18,13 +18,14 @@ from api.routers import line, stop
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
|
|
||||
async def lifespan(app: FastAPI):
|
||||
async def lifespan(app: FastAPI) -> None:
|
||||
|
Adrien
commented
🚫 [mypy] reported by reviewdog 🐶 🚫 **[mypy]** <sub>reported by [reviewdog](https://github.com/reviewdog/reviewdog) :dog:</sub><br>The return type of an async generator function should be "AsyncGenerator" or one of its supertypes [misc]
|
||||
FastAPICache.init(redis_backend, prefix="api", enable=settings.cache.enable)
|
||||
|
||||
await db.connect(settings.db, settings.clear_static_data)
|
||||
if settings.clear_static_data:
|
||||
await idfm_interface.startup()
|
||||
|
||||
print("OK")
|
||||
yield
|
||||
|
||||
await db.disconnect()
|
||||
|
||||
Reference in New Issue
Block a user
🚫 [mypy] reported by reviewdog 🐶
Argument 1 to "asynccontextmanager" has incompatible type "CallableAny], None]"; expected "Callable[[Any], AsyncIterator[Never" [arg-type]