Skip to content

Commit 2f05a1d

Browse files
committedSep 20, 2021
pylint: Check for inclusion directly in dictionary
don't use .keys() b/c pylint doesn't like this on Python 3 and because it is equivalent.
1 parent bf4e23e commit 2f05a1d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎kiwi_lint/views.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ def flatten(urlpatterns, prefix="^", result=None):
7171
return flatten(root_urlpatterns)
7272

7373
def visit_module(self, node):
74-
if node.name in self.views_by_module.keys() and not node.name.endswith(
75-
".admin"
76-
):
74+
if node.name in self.views_by_module and not node.name.endswith(".admin"):
7775
self.view_module = node.name
7876

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

0 commit comments

Comments
 (0)