linting W0201 and W0221
we are going to ignore W0201 and W0221 around the TransmitterEntry save function. Reasons are in the code comments. Signed-off-by: Corey Shields <cshields@gmail.com>merge-requests/399/head
parent
ec07c59263
commit
678de105dd
|
@ -17,8 +17,6 @@ disable=
|
|||
R0914,
|
||||
R0915,
|
||||
R1705,
|
||||
W0201,
|
||||
W0221,
|
||||
W0223,
|
||||
W0511,
|
||||
W0612,
|
||||
|
|
|
@ -192,8 +192,11 @@ class TransmitterEntry(models.Model):
|
|||
def __str__(self):
|
||||
return self.description
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.id = None # pylint: disable=C0103
|
||||
# see https://github.com/PyCQA/pylint-django/issues/94 for why W0221
|
||||
def save(self, *args, **kwargs): # pylint: disable=W0221
|
||||
# this assignment is needed to preserve changes made to a Transmitter
|
||||
# through the admin UI
|
||||
self.id = None # pylint: disable=C0103, W0201
|
||||
super(TransmitterEntry, self).save()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue