codeant-ai-for-open-source[bot] commented on code in PR #41471:
URL: https://github.com/apache/superset/pull/41471#discussion_r3485208668
##########
tests/unit_tests/mcp_service/dashboard/tool/test_update_dashboard.py:
##########
@@ -81,6 +81,9 @@ def _mock_dashboard(
dashboard.slices = []
dashboard.owners = []
dashboard.tags = []
+ # dashboard_serializer reads embedded[0].uuid when truthy (added in
#41195);
+ # model it as an empty list so the serializer resolves embedded_uuid to
None.
+ dashboard.embedded = []
Review Comment:
**Suggestion:** Because this PR modifies `_mock_dashboard`, add an explicit
return type annotation to the function signature so the updated helper is fully
typed (for example returning a `Mock`). [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The changed helper `_mock_dashboard` is a modified Python function and its
signature in the final file still lacks a return type annotation. The custom
rule requires updated Python functions to be fully typed, so this is a real
violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=fd5567c23829427186d7d94a5a8ad8e4&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=fd5567c23829427186d7d94a5a8ad8e4&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
tests/unit_tests/mcp_service/dashboard/tool/test_update_dashboard.py
**Line:** 84:86
**Comment:**
*Custom Rule: Because this PR modifies `_mock_dashboard`, add an
explicit return type annotation to the function signature so the updated helper
is fully typed (for example returning a `Mock`).
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41471&comment_hash=cff400e93d82ce4d8830797a4ea9e1b1401f5ae0119952dd0d14637c005e57b7&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41471&comment_hash=cff400e93d82ce4d8830797a4ea9e1b1401f5ae0119952dd0d14637c005e57b7&reaction=dislike'>👎</a>
--
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]