Fix tox errors

When running tox on stx/gui repository, 5 errors have
been found. This change fix those errors.

Test plan:

PASS: Run tox and verify there is no error.
PASS: Build starlingx-dashboard rpm and verify changes are still
working.

Closes-bug: 1953364

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I6698953f808b68b8ff78ec6d6197a371d25b2f30
This commit is contained in:
Enzo Candotti 2021-12-06 00:28:50 -03:00
parent 68e3924c48
commit 01d9c56e05
5 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2016-2019 Wind River Systems, Inc.
# Copyright (c) 2016-2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -10,9 +10,9 @@ import logging
from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse # noqa
from django.urls import reverse
from django.urls import reverse_lazy
from django.http import HttpResponse # noqa
from django.utils.translation import ugettext_lazy as _
from django.views.generic import View # noqa

View File

@ -347,7 +347,7 @@ class UpdateMemory(forms.SelfHandlingForm):
if(m.vm_pending_as_percentage == "True"):
vm_2M_field.initial = str(float(
round( # pylint: disable=W1633
m.vm_hugepages_nr_2M * 100 \
m.vm_hugepages_nr_2M * 100
// m.vm_hugepages_possible_2M)))
else:
vm_2M_field.initial = str(m.vm_hugepages_nr_2M)

View File

@ -5,8 +5,8 @@
import logging
from django.urls import reverse # noqa
from django.core import validators # noqa
from django.urls import reverse # noqa
from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013-2020 Wind River Systems, Inc.
# Copyright (c) 2013-2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -8,7 +8,6 @@
import logging
from .cpu_functions import utils as icpu_utils
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
@ -18,6 +17,8 @@ from horizon import tabs
from horizon import workflows
from starlingx_dashboard import api as stx_api
from starlingx_dashboard.dashboards.admin.inventory.cpu_functions import \
utils as icpu_utils
from starlingx_dashboard.dashboards.admin.inventory.tabs import HostDetailTabs
from starlingx_dashboard.dashboards.admin.inventory.tabs import InventoryTabs
from starlingx_dashboard.dashboards.admin.inventory.workflows import AddHost

View File

@ -160,7 +160,7 @@ class CreateCloudStrategyForm(forms.SelfHandlingForm):
attrs={
'class': 'switched',
'data-switch-on': 'subcloud_types',
'data-subcloud_types-cloud_name': _()
'data-subcloud_types-cloud_name': _("Force")
}
)
)