1
0
Fork 0

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
Corey Shields 2019-07-13 15:31:04 -04:00
parent ec07c59263
commit 678de105dd
2 changed files with 5 additions and 4 deletions

View File

@ -17,8 +17,6 @@ disable=
R0914,
R0915,
R1705,
W0201,
W0221,
W0223,
W0511,
W0612,

View File

@ -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()