codeant-ai-for-open-source[bot] commented on code in PR #41513:
URL: https://github.com/apache/superset/pull/41513#discussion_r3489599879


##########
superset/db_engine_specs/databend.py:
##########
@@ -404,3 +368,14 @@ def _mutate_label(label: str) -> str:
         :return: Conditionally mutated label
         """
         return f"{label}_{hash_from_str(label)[:6]}"
+
+
+# Backwards-compatible alias. Previously there were two separate specs
+# (a legacy ``DatabendEngineSpec`` without parameter support and a
+# ``DatabendConnectEngineSpec`` with it), both registered under the
+# ``databend`` engine. Because neither declared distinct ``drivers``,
+# ``get_engine_spec`` resolved to the first-defined (legacy) spec, which
+# lacks ``parameters_schema``/``build_sqlalchemy_uri`` and broke the
+# "configure via individual parameters" flow. They are now merged into a
+# single spec; this alias keeps existing imports working.
+DatabendConnectEngineSpec = DatabendEngineSpec

Review Comment:
   **Suggestion:** Declare this backwards-compatibility alias with an explicit 
type annotation so the new assignment remains type-safe and compliant with the 
type-hint rule. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   The alias is a new Python variable assignment that could be annotated, so it 
falls under the type-hint rule for relevant variables.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=9bbd89163bdc46f5906610652b17cddf&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=9bbd89163bdc46f5906610652b17cddf&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/db_engine_specs/databend.py
   **Line:** 381:381
   **Comment:**
        *Custom Rule: Declare this backwards-compatibility alias with an 
explicit type annotation so the new assignment remains type-safe and compliant 
with the type-hint 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%2F41513&comment_hash=9ca74d3934c440ca5eabab98fe4b648939722d3096b1095c43e89e0b8f032d53&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41513&comment_hash=9ca74d3934c440ca5eabab98fe4b648939722d3096b1095c43e89e0b8f032d53&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]

Reply via email to