codeant-ai-for-open-source[bot] commented on code in PR #39469: URL: https://github.com/apache/superset/pull/39469#discussion_r3528690352
########## superset/security/manager.py: ########## @@ -118,6 +121,15 @@ logger = logging.getLogger(__name__) +# Fallback werkzeug-format hash used to balance timing on failed logins when +# ``AUTH_DB_FAKE_PASSWORD_HASH_CHECK`` is not provided by the Flask-AppBuilder +# config defaults. Mirrors FAB's pbkdf2 default so ``check_password_hash`` does +# comparable work whether or not the target user exists. +DEFAULT_AUTH_DB_FAKE_PASSWORD_HASH_CHECK = ( + "pbkdf2:sha256:150000$Z3t6fmj2$22da622d94a1f8118" # noqa: S105 + "c0976a03d2f18f680bfff877c9a965db9eedc51bc0be87c" +) Review Comment: **Suggestion:** Add an explicit type annotation to this newly introduced module-level constant so it complies with the required type-hinting rule for relevant variables. [custom_rule] **Severity Level:** Minor ⚠️ <details> <summary><b>Why it matters? 🤔 </b></summary> This newly added module-level constant is annotated nowhere, and the rule requires type hints for relevant variables that can be annotated. A string constant like this can be typed as `str`, so the suggestion identifies a real violation. </details> [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=18bccd0469ca40658b4c80f3f1219309&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=18bccd0469ca40658b4c80f3f1219309&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/security/manager.py **Line:** 128:131 **Comment:** *Custom Rule: Add an explicit type annotation to this newly introduced module-level constant so it complies with the required type-hinting rule for relevant 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%2F39469&comment_hash=5f2e7cbe6aac90745ca588cf614ab2c6a37c1438c2fc4d17c1b67621ae031219&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39469&comment_hash=5f2e7cbe6aac90745ca588cf614ab2c6a37c1438c2fc4d17c1b67621ae031219&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]
