Skip to content

Commit 599bdaa

Browse files
committed
Ignore unused-argument for *args, **kwards in view method signatures
1 parent fbfa9d1 commit 599bdaa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Unreleased
77
- Start testing with Django 3.2 on Python 3.9 (Michael K.)
88
- Teach pylint-django about all HTTP methods from the View class, not only
99
``get`` and ``post`` (Nicolás Quiroz)
10+
- Ignore ``unused-argument`` for ``*args``, ``**kwards`` in view method signatures
1011

1112

1213
Version 2.4.2 (08 Jan 2021)

pylint_django/augmentations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def ignore_unused_argument_warnings_for_request(orig_method, self, stmt, name):
652652
The signature of Django view functions require the request argument but it is okay if the request is not used.
653653
This function should be used as a wrapper for the `VariablesChecker._is_name_ignored` method.
654654
"""
655-
if name == 'request':
655+
if name in ('request', 'args', 'kwargs'):
656656
return True
657657

658658
return orig_method(self, stmt, name)

0 commit comments

Comments
 (0)