Skip to content

Commit 1c01322

Browse files
authored
Merge branch 'main' into swapydapy/add-test-non-blocking
2 parents 8207081 + ddbfff9 commit 1c01322

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/a2a/server/agent_execution/context.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ def context_id(self) -> str | None:
127127
@property
128128
def configuration(self) -> MessageSendConfiguration | None:
129129
"""The `MessageSendConfiguration` from the request, if available."""
130-
if not self._params:
131-
return None
132-
return self._params.configuration
130+
return self._params.configuration if self._params else None
133131

134132
@property
135133
def call_context(self) -> ServerCallContext | None:
@@ -139,9 +137,7 @@ def call_context(self) -> ServerCallContext | None:
139137
@property
140138
def metadata(self) -> dict[str, Any]:
141139
"""Metadata associated with the request, if available."""
142-
if not self._params:
143-
return {}
144-
return self._params.metadata or {}
140+
return self._params.metadata or {} if self._params else {}
145141

146142
def add_activated_extension(self, uri: str) -> None:
147143
"""Add an extension to the set of activated extensions for this request.

0 commit comments

Comments
 (0)