Skip to content

Commit b076a13

Browse files
author
Agasthya Kasturi
committed
fix format
1 parent bfcbf6f commit b076a13

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/mcp/server/fastmcp/resources/templates.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,13 @@ async def create_resource(self, uri: str, params: dict[str, Any]) -> Resource:
164164
try:
165165
# Prepare parameters for function call
166166
# For optional parameters not in URL, use their default values
167-
fn_params = {}
168167

169168
# First add extracted parameters
170-
for name, value in params.items():
171-
if name in self.required_params or name in self.optional_params:
172-
fn_params[name] = value
169+
fn_params = {
170+
name: value
171+
for name, value in params.items()
172+
if name in self.required_params or name in self.optional_params
173+
}
173174

174175
# self.fn is now multiply-decorated:
175176
# 1. validate_call for coercion/validation

src/mcp/server/fastmcp/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations as _annotations
44

55
import inspect
6-
import re
76
from collections.abc import AsyncIterator, Awaitable, Callable, Iterable, Sequence
87
from contextlib import (
98
AbstractAsyncContextManager,

0 commit comments

Comments
 (0)