{api/views.py|base/models.py}: Disable false-positive no-member pylint errors (E1101)
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>merge-requests/874/head 1.24
parent
ec73abeaa7
commit
a6de5b44f9
|
@ -5,7 +5,6 @@ ignored-argument-names=args|kwargs
|
|||
|
||||
[MESSAGES CONTROL]
|
||||
disable=
|
||||
E1101, # no-member
|
||||
E1121, # too-many-function-args
|
||||
R0801, # needs to remain disabled see https://github.com/PyCQA/pylint/issues/214
|
||||
R0912, # too-many-branches
|
||||
|
|
|
@ -86,7 +86,9 @@ class ObservationView( # pylint: disable=R0901
|
|||
data='Audio has already been uploaded', status=status.HTTP_403_FORBIDDEN
|
||||
)
|
||||
|
||||
super(ObservationView, self).update(request, *args, **kwargs)
|
||||
# False-positive no-member (E1101) pylint error:
|
||||
# Parent class rest_framework.mixins.UpdateModelMixin provides the 'update' method
|
||||
super(ObservationView, self).update(request, *args, **kwargs) # pylint: disable=E1101
|
||||
return Response(status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
|
|
|
@ -259,7 +259,10 @@ class Station(models.Model):
|
|||
@property
|
||||
def observations_future_count(self):
|
||||
"""Return the number of future station's observations"""
|
||||
count = self.observations.is_future().count()
|
||||
# False-positive no-member (E1101) pylint error:
|
||||
# Instance of 'Station' has 'observations' member due to the
|
||||
# Observation.station ForeignKey related_name
|
||||
count = self.observations.is_future().count() # pylint: disable=E1101
|
||||
return count
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue