Skip to content

Commit 45ba6f1

Browse files
fix: resolve ruff linting errors in test_exceptions.py
ROOT CAUSE: Pre-commit hook failed due to missing import and incorrect import order in tests/shared/test_exceptions.py CHANGES: - Moved `import anyio` to top of file with other imports - Added `from builtins import BaseExceptionGroup` import - Fixed import sorting order (ruff I001) IMPACT: CI ruff checks will now pass FILES MODIFIED: - tests/shared/test_exceptions.py
1 parent a6dedc3 commit 45ba6f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/shared/test_exceptions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Tests for MCP exception classes."""
22

3+
from builtins import BaseExceptionGroup
4+
5+
import anyio
36
import pytest
47

58
from mcp.shared.exceptions import MCPError, UrlElicitationRequiredError
@@ -165,7 +168,6 @@ def test_url_elicitation_required_error_exception_message() -> None:
165168

166169

167170
# Tests for unwrap_task_group_exception
168-
import anyio
169171

170172

171173
@pytest.mark.anyio

0 commit comments

Comments
 (0)