codeant-ai-for-open-source[bot] commented on code in PR #40512: URL: https://github.com/apache/superset/pull/40512#discussion_r3542472812
########## superset/config.py: ########## @@ -224,6 +224,20 @@ def _try_json_readsha(filepath: str, length: int) -> str | None: SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT = 0 SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE = None +# Manual dashboard refresh can stagger chart data requests across this many +# milliseconds so they do not all hit the backend at the same instant. This +# defaults to 0, which preserves the original behavior where every chart +# request fires at the same time when the user clicks the Refresh dashboard +# button. Set a positive value to opt in to staggering; the frontend then +# uses the larger of this value and the dashboard's stagger_time metadata, +# which itself defaults to 5000 ms when it is not set explicitly. A dashboard +# with stagger_refresh set to false in its metadata skips staggering on the +# manual refresh path entirely, even when this value is positive. +# If the backend does not provide this value at all (an older backend that +# predates the key, or it is set to None), the frontend falls back to a +# built-in default of 5000 ms. +SUPERSET_DASHBOARD_MANUAL_REFRESH_STAGGER_MS = 0 Review Comment: **Suggestion:** Add an explicit type annotation to this newly introduced configuration variable to comply with the type-hint requirement for annotatable variables. [custom_rule] **Severity Level:** Minor ⚠️ <details> <summary><b>Why it matters? 🤔 </b></summary> This is a newly introduced configuration variable assigned a literal integer without an explicit type annotation, and it can clearly be annotated as an int to satisfy the Python type-hint requirement. </details> <details> <summary><b>Rule source 📖 </b></summary> .cursor/rules/dev-standard.mdc (line 28) </details> [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=fcfe5dba729c4bf88c0282054fad2a1c&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=fcfe5dba729c4bf88c0282054fad2a1c&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/config.py **Line:** 239:239 **Comment:** *Custom Rule: Add an explicit type annotation to this newly introduced configuration variable to comply with the type-hint requirement for annotatable variables. 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%2F40512&comment_hash=a4e4354d18cc094365f6de979616588a53a7b5eda22da6b3f169f27760b0787f&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40512&comment_hash=a4e4354d18cc094365f6de979616588a53a7b5eda22da6b3f169f27760b0787f&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]
