codeant-ai-for-open-source[bot] commented on code in PR #41597:
URL: https://github.com/apache/superset/pull/41597#discussion_r3555204534
##########
superset/mcp_service/dataset/schemas.py:
##########
@@ -262,6 +263,8 @@ class DatasetList(BaseModel):
class ListDatasetsRequest(EditedByMeMixin, CreatedByMeMixin,
MetadataCacheControl):
"""Request schema for list_datasets with clear, unambiguous types."""
+ model_config = ConfigDict(populate_by_name=True)
Review Comment:
**Suggestion:** Add an explicit type annotation to `model_config` (for
example as a class-level `ConfigDict` type) to satisfy the type-hint
requirement for newly introduced variables. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The rule requires type hints on newly introduced Python variables when they
can be annotated. This class-level `model_config` assignment is new code and is
left unannotated, so the suggestion matches a real rule violation.
</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=69031b43ae6445cbaeaa5f737059c976&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=69031b43ae6445cbaeaa5f737059c976&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/dataset/schemas.py
**Line:** 266:266
**Comment:**
*Custom Rule: Add an explicit type annotation to `model_config` (for
example as a class-level `ConfigDict` type) to satisfy the type-hint
requirement for newly introduced 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%2F41597&comment_hash=6605903baab7d1e9f11ce9579b39ebab36a95dd395315539210f31b3c07d9d56&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41597&comment_hash=6605903baab7d1e9f11ce9579b39ebab36a95dd395315539210f31b3c07d9d56&reaction=dislike'>👎</a>
##########
superset/mcp_service/chart/schemas.py:
##########
@@ -306,6 +306,8 @@ class GetChartInfoRequest(BaseModel):
current chart configuration from cache.
"""
+ model_config = ConfigDict(populate_by_name=True)
Review Comment:
**Suggestion:** Add an explicit type annotation to this class-level
configuration attribute (for example as a class variable) to satisfy required
type hints. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The added Pydantic class configuration attribute is unannotated. Since this
is new Python code and the rule requires type hints on relevant variables that
can be annotated, this is a real violation.
</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=b0552e8df3084730ba94cefb558158b9&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=b0552e8df3084730ba94cefb558158b9&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/chart/schemas.py
**Line:** 309:309
**Comment:**
*Custom Rule: Add an explicit type annotation to this class-level
configuration attribute (for example as a class variable) to satisfy required
type hints.
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%2F41597&comment_hash=3b93b133b854f020393188b598a4bc4d1f34fd3efc6a74dacdc5d34a17973bbe&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41597&comment_hash=3b93b133b854f020393188b598a4bc4d1f34fd3efc6a74dacdc5d34a17973bbe&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]