You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/15 22:09:21 UTC

[GitHub] [superset] ktmud commented on a change in pull request #12547: chore: remove # pylint: disable=singleton-comparison

ktmud commented on a change in pull request #12547:
URL: https://github.com/apache/superset/pull/12547#discussion_r558616400



##########
File path: superset/security/manager.py
##########
@@ -592,10 +592,8 @@ def clean_perms(self) -> None:
         sesh = self.get_session
         pvms = sesh.query(PermissionView).filter(
             or_(
-                PermissionView.permission  # pylint: disable=singleton-comparison
-                == None,
-                PermissionView.view_menu  # pylint: disable=singleton-comparison
-                == None,
+                PermissionView.permission is None,
+                PermissionView.view_menu is None,

Review comment:
       I don't think `is` triggers the SQLA comparator, therefore this might not generate the condition you want.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org