codeant-ai-for-open-source[bot] commented on code in PR #41855:
URL: https://github.com/apache/superset/pull/41855#discussion_r3565555271
##########
superset/mcp_service/mcp_core.py:
##########
@@ -326,17 +381,40 @@ def run_tool(
self._validate_order_column(order_column)
+ deleted_state_bound = self._build_deleted_state_filter(deleted_state)
Review Comment:
**Suggestion:** Add a type annotation to this local variable so the
deleted-state filter flow remains fully typed under the custom typing rule.
[custom_rule]
**Severity Level:** Minor ๐งน
<details>
<summary><b>Why it matters? โญ </b></summary>
This modified local variable is also type-annotatable, but it is currently
unannotated, which fits the custom rule requiring type hints on relevant
variables.
</details>
<details>
<summary><b>Rule source ๐ </b></summary>
.cursor/rules/dev-standard.mdc (line 28)
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=b099181bc16448e487eb708ab6e8b446&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=b099181bc16448e487eb708ab6e8b446&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:** superset/mcp_service/mcp_core.py
**Line:** 384:384
**Comment:**
*Custom Rule: Add a type annotation to this local variable so the
deleted-state filter flow remains fully typed under the custom typing rule.
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%2F41855&comment_hash=bba16114c63b64553be8a16fe3197df7e32cdc19cac0a5defaa76a45a37a52a7&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41855&comment_hash=bba16114c63b64553be8a16fe3197df7e32cdc19cac0a5defaa76a45a37a52a7&reaction=dislike'>๐</a>
##########
superset/mcp_service/mcp_core.py:
##########
@@ -326,17 +381,40 @@ def run_tool(
self._validate_order_column(order_column)
+ deleted_state_bound = self._build_deleted_state_filter(deleted_state)
+ if deleted_state_bound is not None:
+ # Trashed rows must be distinguishable from live ones (matters in
+ # "include" mode), so force deleted_at into the loaded columns
+ # and the serialization allowlist.
+ for column_list in (columns_requested, columns_to_load):
+ if "deleted_at" not in column_list:
+ column_list.append("deleted_at")
+
# Query the DAO
items: List[Any]
- items, total_count = self._call_dao_list(
- filters=filters,
- order_column=order_column or "changed_on",
- order_direction=str(order_direction or "desc"),
- page=page,
- page_size=page_size,
- search=search,
- columns_to_load=columns_to_load,
- )
+ dao_kwargs = {
+ "filters": filters,
+ "order_column": order_column or "changed_on",
+ "order_direction": str(order_direction or "desc"),
+ "page": page,
+ "page_size": page_size,
+ "search": search,
+ "columns_to_load": columns_to_load,
Review Comment:
**Suggestion:** Add an explicit type annotation for this dictionary to
satisfy the rule requiring type hints on relevant variables. [custom_rule]
**Severity Level:** Minor ๐งน
<details>
<summary><b>Why it matters? โญ </b></summary>
This new local dictionary is inferably type-annotatable and currently has no
explicit type hint, so it matches the rule requiring type hints on relevant
variables in modified Python code.
</details>
<details>
<summary><b>Rule source ๐ </b></summary>
.cursor/rules/dev-standard.mdc (line 28)
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=7670205f9e7943db92fefcce758cc334&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=7670205f9e7943db92fefcce758cc334&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:** superset/mcp_service/mcp_core.py
**Line:** 394:402
**Comment:**
*Custom Rule: Add an explicit type annotation for this dictionary to
satisfy the rule requiring type hints on relevant variables.
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%2F41855&comment_hash=665fc9f928325d51df92709dce9d5e7dbdfa9692e9bb2eed98a528aa3657acdc&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41855&comment_hash=665fc9f928325d51df92709dce9d5e7dbdfa9692e9bb2eed98a528aa3657acdc&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]