codeant-ai-for-open-source[bot] commented on code in PR #41426:
URL: https://github.com/apache/superset/pull/41426#discussion_r3478626627
##########
tests/unit_tests/models/test_validate_expression.py:
##########
@@ -152,6 +155,36 @@ def test_validate_empty_expression(self, mock_execute):
# The actual error message will come from the exception
assert "empty" in result["errors"][0]["message"].lower()
+ @patch("superset.models.helpers.is_feature_enabled", return_value=False)
+
@patch("superset.connectors.sqla.models.SqlaTable._execute_validation_query")
Review Comment:
**Suggestion:** Add complete type hints to this new test method signature,
including parameter annotations for patched mocks and an explicit `None` return
type. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This is a newly added Python test method, and its signature omits type hints
for the
patched mock parameters and the return type. That matches the custom rule
requiring
new Python functions to be fully typed.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=272d21f6ced14dc98c63ea9ebd2598b1&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=272d21f6ced14dc98c63ea9ebd2598b1&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/models/test_validate_expression.py
**Line:** 159:159
**Comment:**
*Custom Rule: Add complete type hints to this new test method
signature, including parameter annotations for patched mocks and an explicit
`None` return 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%2F41426&comment_hash=5786470b6381b74b35cbdf8952ec100022afde3c7c4adc4a8ed3b49e025b3aac&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41426&comment_hash=5786470b6381b74b35cbdf8952ec100022afde3c7c4adc4a8ed3b49e025b3aac&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]