Skip to content

Commit

Permalink
276 - Replaced unecessary generic_is_view_attribute function
Browse files Browse the repository at this point in the history
  • Loading branch information
dineshtrivedi committed Jan 21, 2022
1 parent 3e56dd2 commit 200bee9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pylint_django/augmentations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,6 @@ def __call__(self, node):
return _attribute_is_magic(node, self.attrs, self.parents)


def generic_is_view_attribute(parents, attrs) -> IsAttribute:
"""Generates is_X_attribute function for given parents and attrs."""
return IsAttribute(parents, attrs)


def is_model_view_subclass_method_shouldnt_be_function(node):
"""Checks that node is a default http method (i.e get, post, put, and more) of the View class."""
if node.name not in View.http_method_names:
Expand Down Expand Up @@ -866,7 +861,7 @@ def apply_augmentations(linter):
linter,
TypeChecker.visit_attribute,
"no-member",
generic_is_view_attribute(parents, attrs),
IsAttribute(parents, attrs),
)

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

0 comments on commit 200bee9

Please sign in to comment.