codeant-ai-for-open-source[bot] commented on code in PR #29554:
URL: https://github.com/apache/superset/pull/29554#discussion_r3463980545
##########
superset/commands/dataset/exceptions.py:
##########
@@ -162,11 +165,21 @@ class DatasetInvalidError(CommandInvalidError):
message = _("Dataset parameters are invalid.")
-class DatasetCreateFailedError(CreateFailedError):
+class DatasetSQLStatementErrorMixin(CommandException):
+ def __init__(
+ self,
+ ex: Optional[Exception] = None,
+ ) -> None:
+ if isinstance(ex, SupersetSecurityException):
+ self.message = str(ex)
+ super().__init__()
+
+
+class DatasetCreateFailedError(CreateFailedError,
DatasetSQLStatementErrorMixin):
Review Comment:
**Suggestion:** Add a short class docstring to describe the purpose of this
newly added exception type. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This is a newly added Python class and it does not have a docstring in the
final file state. That violates the rule requiring new classes to be documented
inline.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=f5cd0ad72fcb4b6cbc3c3086d7aa59a7&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=f5cd0ad72fcb4b6cbc3c3086d7aa59a7&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/commands/dataset/exceptions.py
**Line:** 178:178
**Comment:**
*Custom Rule: Add a short class docstring to describe the purpose of
this newly added exception type.
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%2F29554&comment_hash=51a68d2a0f7357d12395d168a9f1a4f6d9dd39a7eaf78cdb20ed6de8cfea14d1&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F29554&comment_hash=51a68d2a0f7357d12395d168a9f1a4f6d9dd39a7eaf78cdb20ed6de8cfea14d1&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]