Open thinh9e opened 5 years ago
As an alternative, you can safely use **_kwargs
.
Hi, I'm having the same issue and I'm intrested in working on implementing a fix for this, are there any pointers on how to start working on this?
@JensTimmerman see ignore_unused_argument_warnings_for_request
in augmentations/__init__.py
and how it is used. You first need to add a test scenario for this issue, then figure out which one of the core pylint checkers is triggering the warning (look into pylint's source code) and then come up with a solution, similar to the one we already have. (honestly I baffles me why the current one doesn't work).
For a general reference about pylint plugins see https://www.youtube.com/watch?v=3CkSKUNMLJc, the interesting stuff related to checkers & augmentations is at the end, after the Q&A session.
@atodorov this seems to have been a misuse of the plugin system in pylint, I can reproduce the issue, but I can also fix it by actually using the pylint_django plugin correctly.
pylint --load-plugins=pylint_django test.py --django-settings-module=settings
-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 1.67/10, +8.33)
pylint test.py
************* Module test
test.py:6:0: W0613: Unused argument 'kwargs' (unused-argument)
-------------------------------------------------------------------
Your code has been rated at 8.33/10 (previous run: 10.00/10, -1.67)
My code:
I don't use
**kwargs
in my function, but**kwargs
is a mandatory variable to usingpost_save
. Therefor, I have a warning "[pylint] Unused argument 'kwargs' [W0613]". Can you fix to hide warning in this case? Thanks!Output
$ pip freeze
: