bito-code-review[bot] commented on code in PR #37067:
URL: https://github.com/apache/superset/pull/37067#discussion_r2743763909
##########
superset/db_engine_specs/base.py:
##########
@@ -523,9 +530,9 @@ class BaseEngineSpec: # pylint:
disable=too-many-public-methods
max_column_name_length: int | None = None
try_remove_schema_from_table_name = True # pylint: disable=invalid-name
run_multiple_statements_as_one = False
- custom_errors: dict[
- Pattern[str], tuple[str, SupersetErrorType, dict[str, Any]]
- ] = {}
+ custom_errors: dict[Pattern[str], tuple[str, SupersetErrorType, dict[str,
Any]]] = (
+ {}
+ )
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Type mismatch in class attribute</b></div>
<div id="fix">
The custom_errors class attribute is typed as dict but assigned a tuple,
which will cause an AttributeError at runtime when .items() is called on it in
error handling code.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
custom_errors: dict[Pattern[str], tuple[str, SupersetErrorType,
dict[str, Any]]] = {}
````
</div>
</details>
</div>
<small><i>Code Review Run #c1544d</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]