Skip to content

Commit

Permalink
pylint: Check for inclusion directly in dictionary
Browse files Browse the repository at this point in the history
don't use .keys() b/c pylint doesn't like this on Python 3 and because
it is equivalent.
  • Loading branch information
atodorov committed Sep 20, 2021
1 parent 2074a86 commit 24b97cb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kiwi_lint/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ def flatten(urlpatterns, prefix="^", result=None):
return flatten(root_urlpatterns)

def visit_module(self, node):
if node.name in self.views_by_module.keys() and not node.name.endswith(
".admin"
):
if node.name in self.views_by_module and not node.name.endswith(".admin"):
self.view_module = node.name

def leave_module(self, node): # pylint: disable=unused-argument
Expand Down

0 comments on commit 24b97cb

Please sign in to comment.