bito-code-review[bot] commented on code in PR #40340:
URL: https://github.com/apache/superset/pull/40340#discussion_r3344408070


##########
superset/mcp_service/app.py:
##########
@@ -874,7 +880,7 @@ def init_fastmcp_server(
 
     # Remove disabled tools BEFORE generating instructions so that the
     # instructions never advertise tools that clients cannot actually call.
-    disabled_tools: set[str] = flask_app.config.get("MCP_DISABLED_TOOLS", 
set())
+    disabled_tools: set[str] = flask_app.config["MCP_DISABLED_TOOLS"]

Review Comment:
   <!-- Bito Reply -->
   The suggestion to use `.get()` is appropriate for this code. Using 
`.get("MCP_DISABLED_TOOLS", set())` ensures that the code handles cases where 
the configuration key might be missing, preventing potential errors during test 
execution when the configuration is mocked.
   
   **superset/mcp_service/app.py**
   ```
   -    disabled_tools: set[str] = flask_app.config["MCP_DISABLED_TOOLS"]
   +    disabled_tools: set[str] = flask_app.config.get("MCP_DISABLED_TOOLS", 
set())
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to