codeant-ai-for-open-source[bot] commented on code in PR #40960:
URL: https://github.com/apache/superset/pull/40960#discussion_r3501654203
##########
superset/daos/dashboard.py:
##########
@@ -431,36 +431,25 @@ def update_native_filters_config(
raise DashboardUpdateFailedError("Dashboard not found")
if attributes:
- metadata = json.loads(dashboard.json_metadata or "{}")
+ try:
+ _parsed = json.loads(dashboard.json_metadata or "{}")
+ except (json.JSONDecodeError, TypeError):
+ _parsed = {}
+ metadata = _parsed if isinstance(_parsed, dict) else {}
native_filter_configuration = metadata.get(
"native_filter_configuration", []
)
reordered_filter_ids: list[int] = attributes.get("reordered", [])
+ deleted_ids = set(attributes.get("deleted", []))
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not require explicit type annotations for clearly inferred local
variables (including set literals) when the codebase convention does not
annotate locals.
**Applied to:**
- `**/*.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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]