Merge "Fix local variable is assigned to but never used"
This commit is contained in:
commit
adf77a5440
@ -52,7 +52,7 @@ class IndexView(tables.DataTableView):
|
||||
paginator = Paginator(results, limit)
|
||||
results = paginator.page(1)
|
||||
except EmptyPage:
|
||||
contacts = paginator.page(paginator.num_pages)
|
||||
results = paginator.page(paginator.num_pages)
|
||||
except Exception:
|
||||
messages.error(self.request, _("Could not retrieve alarm definitions"))
|
||||
|
||||
|
@ -149,7 +149,7 @@ class SetAlarmDefinitionExpressionAction(workflows.Action):
|
||||
|
||||
try:
|
||||
self.fields['expression'].metrics = ad_forms._get_metrics(request)
|
||||
except Exception as ex:
|
||||
except Exception:
|
||||
exceptions.handle(request, _('Unable to retrieve metrics'))
|
||||
|
||||
|
||||
|
@ -205,7 +205,7 @@ class AlarmServiceView(tables.DataTableView):
|
||||
try:
|
||||
name, value = self.service.split("=")
|
||||
results = [api.monitor.alarm_show(self.request, value)]
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
messages.error(self.request, _("Could not retrieve alarms"))
|
||||
results = []
|
||||
else:
|
||||
|
@ -49,7 +49,7 @@ class IndexView(tables.DataTableView):
|
||||
paginator = Paginator(results, LIMIT)
|
||||
results = paginator.page(1)
|
||||
except EmptyPage:
|
||||
contacts = paginator.page(paginator.num_pages)
|
||||
results = paginator.page(paginator.num_pages)
|
||||
except Exception:
|
||||
messages.error(self.request, _("Could not retrieve notifications"))
|
||||
return results
|
||||
|
3
tox.ini
3
tox.ini
@ -29,7 +29,6 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_templ
|
||||
# E127 continuation line over-indented for visual indent
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E501 line too long
|
||||
# F841 local variable is assigned to but never used
|
||||
# H102 Apache 2.0 license header not found
|
||||
# H238 old style class declaration, use new style
|
||||
# H301 one import per line
|
||||
@ -39,4 +38,4 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_templ
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# H803 git commit title should not end with period (disabled on purpose, see bug #1236621)
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = E127,E128,E501,F841,H102,H238,H301,H305,H306,H307,H405,H803,H904
|
||||
ignore = E127,E128,E501,H102,H238,H301,H305,H306,H307,H405,H803,H904
|
||||
|
Loading…
Reference in New Issue
Block a user