Skip to content

Commit 889c94e

Browse files
committed
fix: apply ruff formatting
1 parent c7c37d8 commit 889c94e

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/mcp/client/session.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
logger = logging.getLogger("client")
1919

2020

21-
2221
class SamplingFnT(Protocol):
2322
async def __call__(
2423
self,
@@ -342,8 +341,7 @@ async def _validate_tool_result(self, name: str, result: types.CallToolResult) -
342341
raise RuntimeError(f"Invalid structured content returned by tool {name}: {e}") from e
343342
else:
344343
logger.warning(
345-
f"Invalid structured content returned by tool {name}: {e}. "
346-
f"Continuing without validation."
344+
f"Invalid structured content returned by tool {name}: {e}. Continuing without validation."
347345
)
348346
except SchemaError as e:
349347
# Schema errors are always raised - they indicate a problem with the schema itself

src/mcp/server/auth/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async def revoke_token(
281281

282282
def construct_redirect_uri(redirect_uri_base: str, **params: str | None) -> str:
283283
parsed_uri = urlparse(redirect_uri_base)
284-
query_params = [(k, v) for k, vs in parse_qs(parsed_uri.query) for v in vs]
284+
query_params = [(k, v) for k, vs in parse_qs(parsed_uri.query).items() for v in vs]
285285
for k, v in params.items():
286286
if v is not None:
287287
query_params.append((k, v))

tests/client/test_validation_options.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ async def test_lenient_validation_invalid_content(self, caplog):
9393

9494
# Create client with lenient validation
9595

96-
9796
read_stream = MagicMock()
9897
write_stream = MagicMock()
9998

@@ -162,7 +161,6 @@ async def test_schema_errors_always_raised(self):
162161
"""Test that schema errors are always raised regardless of validation mode."""
163162
# Create client with lenient validation
164163

165-
166164
read_stream = MagicMock()
167165
write_stream = MagicMock()
168166

0 commit comments

Comments
 (0)