Prab-27 commented on PR #53953:
URL: https://github.com/apache/airflow/pull/53953#issuecomment-3201530029
I need to deep dive into pre-commit hook because it doesn't detect certain
patterns `session.query` code from fab like
```
security_manager.sync_roles()
num_pv_before = db.session().query(ab_perm_role).count()
security_manager.sync_roles()
num_pv_after = db.session().query(ab_perm_role).count()
assert num_pv_before == num_pv_after
```
```self.log.debug("Cleaning faulty perms")
sesh = self.appbuilder.get_session
perms = sesh.query(Permission).filter(
or_(
Permission.action == None, # noqa: E711
Permission.resource == None, # noqa: E711
)
)
```
--
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]