fix: address code review feedback

- Add inline safety comment for noqa: S608 (table_name from inspect)
- Fix HTTPException detail to be a string (not dict)
- Add aria-label to migration progress bar
- Rename _noop to _NoOpContextManager in tests
- Add explanatory comment for zip(strict=False)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-05 22:22:49 +00:00
parent cb3bf809cc
commit 507c333c15
4 changed files with 10 additions and 4 deletions
+4 -2
View File
@@ -31,7 +31,7 @@ class TestDatabaseApiEndpoints:
def test_build_url_sqlite(self, client):
"""Test building a SQLite URL as admin."""
# Simulate admin session
with client.session_transaction() if hasattr(client, "session_transaction") else _noop():
with client.session_transaction() if hasattr(client, "session_transaction") else _NoOpContextManager():
pass
# Use the session cookie approach
client.cookies.set("session", "test")
@@ -148,7 +148,9 @@ class TestDatabaseWizardView:
# Context manager helper for tests that don't need session_transaction
class _noop:
class _NoOpContextManager:
"""Dummy context manager for tests that don't need session_transaction."""
def __enter__(self):
return None