ignoring warnings of too complex functions
This commit is contained in:
parent
806e9ad8d0
commit
56b8e0886c
|
@ -185,7 +185,7 @@ class UploadSnapshotForm(FlaskForm):
|
|||
db.session.commit()
|
||||
return response
|
||||
|
||||
def build(self, snapshot_json):
|
||||
def build(self, snapshot_json): # noqa: C901
|
||||
# this is a copy adaptated from ereuse_devicehub.resources.action.views.snapshot
|
||||
device = snapshot_json.pop('device') # type: Computer
|
||||
components = None
|
||||
|
@ -299,7 +299,7 @@ class NewDeviceForm(FlaskForm):
|
|||
if not self.depth.data:
|
||||
self.depth.data = 0.1
|
||||
|
||||
def validate(self, extra_validators=None):
|
||||
def validate(self, extra_validators=None): # noqa: C901
|
||||
error = ["Not a correct value"]
|
||||
is_valid = super().validate(extra_validators)
|
||||
|
||||
|
@ -490,7 +490,7 @@ class TagDeviceForm(FlaskForm):
|
|||
if self.device.data:
|
||||
try:
|
||||
self.device.data = int(self.device.data.split(',')[-1])
|
||||
except:
|
||||
except: # noqa: E722
|
||||
self.device.data = None
|
||||
|
||||
if self.device_id or self.device.data:
|
||||
|
|
Reference in New Issue