1
0
Fork 0

forms/BaseObservationFormSet: Add missing initialization of member variable (W0201)

Fixes the attribute-defined-outside-init (W0201) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
merge-requests/867/head
Fabian P. Schmidt 2020-01-02 21:39:46 +01:00
parent fbabd125ad
commit caa861b187
3 changed files with 2 additions and 2 deletions

View File

@ -10,5 +10,4 @@ disable=
R0912, # too-many-branches
R0913, # too-many-arguments
R0914, # too-many-locals
W0201, # attribute-defined-outside-init
W0703, # broad-except

View File

@ -12,5 +12,4 @@ disable=
R0912, # too-many-branches
R0913, # too-many-arguments
R0914, # too-many-locals
W0201, # attribute-defined-outside-init
W0703, # broad-except

View File

@ -81,6 +81,8 @@ class ObservationForm(forms.ModelForm):
class BaseObservationFormSet(forms.BaseFormSet):
"""Base FormSet class for Observation objects forms"""
transmitters = {}
def __init__(self, user, *args, **kwargs):
"""Initializes Observation FormSet"""
self.user = user