codeant-ai-for-open-source[bot] commented on code in PR #41425:
URL: https://github.com/apache/superset/pull/41425#discussion_r3477243658
##########
tests/integration_tests/core_tests.py:
##########
@@ -887,6 +887,22 @@ def test_explore_redirect(self, mock_command: mock.Mock):
)
assert rv.headers["Location"] ==
f"/explore/?form_data_key={random_key}"
+ @pytest.mark.usefixtures("load_energy_table_with_slice")
+ @mock.patch("superset.security.SupersetSecurityManager.raise_for_access")
+ def test_explore_view_checks_datasource_access(self,
mock_raise_for_access):
Review Comment:
**Suggestion:** Add full type annotations to this new test method signature,
including the mocked argument type 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 mocked parameter and the return type. The custom rule requires newly
added Python functions and methods to be fully typed, so this is a real
violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=16e3d845dfb149a5a866199d1cff2651&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=16e3d845dfb149a5a866199d1cff2651&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/integration_tests/core_tests.py
**Line:** 892:892
**Comment:**
*Custom Rule: Add full type annotations to this new test method
signature, including the mocked argument type 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%2F41425&comment_hash=5867f0af64bd01ca41d43a618338ef7861fc6b3f4c8930106c531c28ea549ade&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41425&comment_hash=5867f0af64bd01ca41d43a618338ef7861fc6b3f4c8930106c531c28ea549ade&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]