Skip to content

Commit d153369

Browse files
committed
Suppress too-many-ancestors for ModelViewSets
1 parent 6c1e67e commit d153369

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
* [naquiroz](https://github.com/naquiroz)
2121
* [john-sandall](https://github.com/john-sandall)
2222
* [dineshtrivedi](https://github.com/dineshtrivedi)
23+
* [jhhayashi](https://github.com/jhhayashi)

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ This plugin is disabled by default! To enable it::
106106
Contributing
107107
------------
108108

109-
Please feel free to add your name to the ``CONTRIBUTORS.rst`` file if you want to
109+
Please feel free to add your name to the ``CONTRIBUTORS.md`` file if you want to
110110
be credited when pull requests get merged. You can also add to the
111111
``CHANGELOG.rst`` file if you wish, although we'll also do that when merging.
112112

pylint_django/augmentations/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,14 @@ def apply_augmentations(linter):
895895
IsClass("django.views.generic.edit.ProcessFormView"),
896896
)
897897

898+
# ModelViewSet also suffers from too many ancestors
899+
suppress_message(
900+
linter,
901+
MisdesignChecker.visit_classdef,
902+
"too-many-ancestors",
903+
IsClass("rest_framework.viewsets.ModelViewSet"),
904+
)
905+
898906
# model forms have no __init__ method anywhere in their bases
899907
suppress_message(
900908
linter,

0 commit comments

Comments
 (0)