Skip to content

Commit 200bee9

Browse files
committed
276 - Replaced unecessary generic_is_view_attribute function
1 parent 3e56dd2 commit 200bee9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pylint_django/augmentations/__init__.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,6 @@ def __call__(self, node):
654654
return _attribute_is_magic(node, self.attrs, self.parents)
655655

656656

657-
def generic_is_view_attribute(parents, attrs) -> IsAttribute:
658-
"""Generates is_X_attribute function for given parents and attrs."""
659-
return IsAttribute(parents, attrs)
660-
661-
662657
def is_model_view_subclass_method_shouldnt_be_function(node):
663658
"""Checks that node is a default http method (i.e get, post, put, and more) of the View class."""
664659
if node.name not in View.http_method_names:
@@ -866,7 +861,7 @@ def apply_augmentations(linter):
866861
linter,
867862
TypeChecker.visit_attribute,
868863
"no-member",
869-
generic_is_view_attribute(parents, attrs),
864+
IsAttribute(parents, attrs),
870865
)
871866

872867
# formviews have too many ancestors, there's nothing the user of the library can do about that

0 commit comments

Comments
 (0)