Lee-W commented on code in PR #74695:
URL: https://github.com/apache/airflow/pull/74695#discussion_r4269136306
##########
providers/common/ai/src/airflow/providers/common/ai/toolsets/mcp.py:
##########
@@ -84,12 +84,12 @@ def __init__(
self,
mcp_conn_id: str,
*,
- tool_prefix: str | None = None,
+ tool_prefix: str = "",
token_provider: Callable[[], str] | None = None,
env_provider: Callable[[], dict[str, str]] | None = None,
) -> None:
self._mcp_conn_id = mcp_conn_id
- self._tool_prefix = tool_prefix
+ self._tool_prefix = tool_prefix or ""
Review Comment:
Yes, we should drop the `None` promise. `tool_prefix` is `str` with a `""`
default on both `MCPToolset` and `MCPHook`. removed `or ""` fallbacks, and the
docstrings, `mcp.rst` and the changelog mention of `None`.
Also, removed he `type: ignore` tests introduced in another PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]