bito-code-review[bot] commented on code in PR #44504: URL: https://github.com/apache/superset/pull/44504#discussion_r4068093154
########## superset/security/password_change.py: ########## @@ -36,14 +36,15 @@ from sqlalchemy.exc import IntegrityError from superset.utils.decorators import transaction +from superset.views.health import health_blueprint Review Comment: <div> <div id="suggestion"> <div id="issue"><b>Security-to-views layering import</b></div> <div id="fix"> This module-scope import couples the security layer to the views layer: importing `superset.views.health` first executes `superset/views/__init__.py`, which imports `core`, `sql_lab`, `tags`, etc. Both consumers import this module lazily (`initialization/__init__.py`, `security/manager.py`), and `_get_user_attribute`'s comment defers cycle-prone imports. Consider importing `health_blueprint` inside `register_password_change_enforcement`. </div> </div> <small><i>Code Review Run #6fa8f8</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]
