mirror of
https://github.com/apache/superset.git
synced 2026-05-28 19:25:20 +00:00
fix(mcp): fix CI pre-commit failures for RBAC tool visibility
- auth.py: collapse check_tool_permission signature to one line (ruff-format) - auth.py: extract _log_user_resolution_failure() helper to reduce _setup_user_context cyclomatic complexity from 11 to 10 (ruff C901) - test_middleware.py: shorten docstring to stay within 88-char limit (ruff E501)
This commit is contained in:
@@ -1215,7 +1215,7 @@ class TestRBACToolVisibilityMiddleware:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_fails_closed_on_bad_credentials_value_error(self, app) -> None:
|
||||
"""Returns empty list when auth was attempted but user not found (ValueError)."""
|
||||
"""Returns empty list when auth was attempted but user not found."""
|
||||
from superset.mcp_service.middleware import RBACToolVisibilityMiddleware
|
||||
|
||||
tools = [self._make_tool("list_charts"), self._make_tool("generate_chart")]
|
||||
|
||||
Reference in New Issue
Block a user