Cleaner and non-deprecated typing for template app module. Avoids ruff errors with strict configurations.
This commit is contained in:
1 parent
8774224545
commit
475a2cdc3c
2 files changed
+4
-4
No files matched your search
@@ -166,7 +166,7 @@ frontend = Frontend(Path(__file__).with_name("frontend-build"))
|
||||
# Lifespan block for patching apps that don't have one
|
||||
LIFESPAN_BLOCK = """
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
async def lifespan(_app: FastAPI):
|
||||
\"\"\"Manage app startup and shutdown resources.\"\"\"
|
||||
await frontend.load()
|
||||
yield
|
||||
|
||||
Reference in new issue
Block a user