bito-code-review[bot] commented on code in PR #34880:
URL: https://github.com/apache/superset/pull/34880#discussion_r3575619941
##########
superset/dashboards/api.py:
##########
@@ -1959,6 +1963,7 @@ def import_(self) -> Response:
else None
)
overwrite = request.form.get("overwrite") == "true"
+ overwrite_all = parse_boolean_string(request.form.get("overwrite_all",
"false"))
ssh_tunnel_passwords = (
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Duplicate SSH tunnel handling code</b></div>
<div id="fix">
The SSH tunnel credential parsing pattern (ssh_tunnel_passwords,
ssh_tunnel_private_keys, ssh_tunnel_priv_key_passwords) is duplicated across
superset/dashboards/api.py (lines 1968-1984), superset/charts/api.py (lines
1191-1207), superset/datasets/api.py (lines 1025-1041),
superset/queries/saved_queries/api.py (lines 410-426), and
superset/importexport/api.py (lines 206-222). Extracting this to a shared
helper function would reduce code duplication significantly.
</div>
</div>
<small><i>Code Review Run #a7e658</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]