-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Description
pylint-django
currently suppresses the unused-argument
warning when a function/method contains an argument called request
. The reason to ignore these warnings for an argument named request
was discussed in #155 and implemented with commit e4c8fc7.
Unfortunately the warning is also suppressed for all other function arguments. Therefore every other unused argument of the function will not be reported. Unused arguments can be an indicator for bugs and these warnings should only be explicitly silenced.
Example
def user_detail(request, user_id):
# nothing is done with user_id
return JsonResponse({'username': 'steve'})
Pylint should issue a warning that user_id
is unused. But because the function has an argument named request
no warning is issued.
fechnert
Metadata
Metadata
Assignees
Labels
No labels