Skip to content

Commit e1203df

Browse files
Remove TODO comment + uniform style
1 parent 8afaefd commit e1203df

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/mcp/client/session.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,11 @@ async def initialize(self) -> types.InitializeResult:
121121
if self._sampling_callback is not _default_sampling_callback
122122
else None
123123
)
124-
if self._list_roots_callback is _default_list_roots_callback:
125-
roots = None
126-
else:
127-
roots = types.RootsCapability(
128-
# TODO: Should this be based on whether we
129-
# _will_ send notifications, or only whether
130-
# they're supported?
131-
listChanged=True,
132-
)
124+
roots = (
125+
types.RootsCapability(listChanged=True)
126+
if self._list_roots_callback is not _default_list_roots_callback
127+
else None
128+
)
133129

134130
result = await self.send_request(
135131
types.ClientRequest(

0 commit comments

Comments
 (0)