pylint: fix unexpected-keyword-arg error

horizon/forms/fields.py:
ThemableCheckboxSelectMultiple.__init__ does not have
arguments "name" and "value". They were specified before somehow.

openstack_dashboard/dashboards/project/instances/forms.py:
messages.error() does not have "redirect" argument.
We need to redirect explicitly.

Change-Id: Ib51abf136fb49e3be65005c5f48715f004379178
This commit is contained in:
Akihiro Motoki 2018-12-10 04:00:51 +09:00
parent 64542397d8
commit 9518f7a5e7
3 changed files with 2 additions and 5 deletions

View File

@ -14,7 +14,6 @@ disable=
no-member,
not-callable,
raising-non-exception,
unexpected-keyword-arg,
# "W" Warnings for stylistic problems or minor programming issues
arguments-differ,
attribute-defined-outside-init,

View File

@ -573,8 +573,6 @@ class ThemableCheckboxSelectMultiple(widgets.CheckboxSelectMultiple):
if id_:
attrs_plus['id'] += '_{}'.format(i)
sub_ul_renderer = self.__class__(
name=self.name,
value=self.value,
attrs=attrs_plus,
choices=choice_label,
)

View File

@ -454,8 +454,8 @@ class Disassociate(forms.SelfHandlingForm):
fips = [fip for fip in self.fips if fip.id == fip_id]
if not fips:
messages.error(request,
_("The specified floating IP no longer exists."),
redirect=redirect)
_("The specified floating IP no longer exists."))
raise exceptions.Http302(redirect)
fip = fips[0]
try:
if data['is_release']: