From e45a4982c6bbb70d18e8e6f1a13505cb83b2b0d9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 2 Mar 2022 13:31:21 +0100 Subject: [PATCH] ignoring warnings of too complex function --- ereuse_devicehub/inventory/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index da035520..1032b3e7 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -180,7 +180,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 @@ -294,7 +294,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) @@ -489,7 +489,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: