From ec4866bea4a60c296fcd109fa3094803852c64ff Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Mon, 31 Aug 2026 13:18:18 -0700 Subject: [PATCH] Apply ruff 0.16 and black fixes Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA --- datasette/utils/asgi.py | 4 ++-- tests/test_lifespan.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/datasette/utils/asgi.py b/datasette/utils/asgi.py index 5a5a5c42..2614ad02 100644 --- a/datasette/utils/asgi.py +++ b/datasette/utils/asgi.py @@ -304,7 +304,7 @@ class AsgiLifespan: try: for fn in self.on_startup: await fn() - except Exception as e: + except Exception as e: # noqa: BLE001 await send( {"type": "lifespan.startup.failed", "message": str(e)} ) @@ -314,7 +314,7 @@ class AsgiLifespan: try: for fn in self.on_shutdown: await fn() - except Exception as e: + except Exception as e: # noqa: BLE001 await send( {"type": "lifespan.shutdown.failed", "message": str(e)} ) diff --git a/tests/test_lifespan.py b/tests/test_lifespan.py index 359ba1c9..3655285e 100644 --- a/tests/test_lifespan.py +++ b/tests/test_lifespan.py @@ -11,9 +11,10 @@ These exercise Datasette._startup_sequence() via three different callers: import asyncio import contextlib +import sqlite3 + import httpx import pytest -import sqlite3 from datasette import hookimpl from datasette.app import Datasette