Skip to content

Commit 7801dc3

Browse files
committed
refactor: type notify as ClientNotification, remove getattr
1 parent edf4833 commit 7801dc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcp/server/lowlevel/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ async def _handle_request(
508508

509509
async def _handle_notification(
510510
self,
511-
notify: Any,
511+
notify: types.ClientNotification,
512512
session: ServerSession,
513513
lifespan_context: LifespanResultT,
514514
) -> None:
@@ -528,7 +528,7 @@ async def _handle_notification(
528528
_task_support=task_support,
529529
),
530530
)
531-
await handler(ctx, getattr(notify, "params", None))
531+
await handler(ctx, notify.params)
532532
except Exception: # pragma: no cover
533533
logger.exception("Uncaught exception in notification handler")
534534

0 commit comments

Comments
 (0)