From 0fe6e0fcbe2dc137117baf5d6d4bb63d7cc9a10c Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Tue, 16 Feb 2021 12:51:20 +0000 Subject: [PATCH] Fix gate jobs This patch update the following: * add ignore_basepython_conflict = true in tox.ini file. * replace horizon tarballs dependency with constraints file. * update hacking version to latest 4.0.0 version. * fix pep8 warnings. Change-Id: If0275b78f9084e314e6a69e267a79fc4472c0dfe (cherry picked from commit f5473fc2367a0ca40b33796e74d2ecdd106b36cd) (cherry picked from commit cc68bea1c648e70d98bb53218ad653a1dbdc134c) Change-Id: I0ff28d6895f46faab041734c2d0ff838daf16aaa (cherry picked from commit 0734ddd2423eaf48490c7f4d3f603192593413c4) Change-Id: I6cfcb8499177868ff41ec7313dd5ad1a7cd069c9 --- mistraldashboard/action_executions/tables.py | 3 +-- mistraldashboard/default/smart_cell.py | 6 +++--- mistraldashboard/executions/tables.py | 3 +-- mistraldashboard/tasks/tables.py | 3 +-- mistraldashboard/test/settings.py | 2 +- test-requirements.txt | 4 ++-- tox.ini | 6 +++--- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/mistraldashboard/action_executions/tables.py b/mistraldashboard/action_executions/tables.py index 221af9d..d7a4c77 100644 --- a/mistraldashboard/action_executions/tables.py +++ b/mistraldashboard/action_executions/tables.py @@ -80,8 +80,7 @@ class ActionExecutionsTable(tables.DataTable): def getHoverHelp(data): if hasattr(data, 'state_info') and data.state_info: - - return {'title': data.state_info} + return {'title': data.state_info} STATE_STATUS_CHOICES = ( ("success", True), diff --git a/mistraldashboard/default/smart_cell.py b/mistraldashboard/default/smart_cell.py index 56460bc..0b44ec6 100644 --- a/mistraldashboard/default/smart_cell.py +++ b/mistraldashboard/default/smart_cell.py @@ -53,9 +53,9 @@ def get_data(self, datum, column, row): if (template.defaultfilters.urlize in column.filters or template.defaultfilters.yesno in column.filters): - data = widget.render(widget_name, - column.get_raw_data(datum), - form_field_attributes) + data = widget.render(widget_name, + column.get_raw_data(datum), + form_field_attributes) else: data = widget.render(widget_name, column.get_data(datum), diff --git a/mistraldashboard/executions/tables.py b/mistraldashboard/executions/tables.py index 6646457..c150750 100644 --- a/mistraldashboard/executions/tables.py +++ b/mistraldashboard/executions/tables.py @@ -158,8 +158,7 @@ class ExecutionsTable(tables.DataTable): def getHoverHelp(data): if hasattr(data, 'state_info') and data.state_info: - - return {'title': data.state_info} + return {'title': data.state_info} STATE_STATUS_CHOICES = ( ("success", True), diff --git a/mistraldashboard/tasks/tables.py b/mistraldashboard/tasks/tables.py index 3fe3df4..86a6a15 100644 --- a/mistraldashboard/tasks/tables.py +++ b/mistraldashboard/tasks/tables.py @@ -60,8 +60,7 @@ class TaskTable(tables.DataTable): def getHoverHelp(data): if hasattr(data, 'state_info') and data.state_info: - - return {'title': data.state_info} + return {'title': data.state_info} STATE_STATUS_CHOICES = ( ("success", True), diff --git a/mistraldashboard/test/settings.py b/mistraldashboard/test/settings.py index cd11fb7..77b0544 100644 --- a/mistraldashboard/test/settings.py +++ b/mistraldashboard/test/settings.py @@ -16,5 +16,5 @@ from horizon.test.settings import * # noqa from openstack_dashboard.test.settings import * # noqa -INSTALLED_APPS = list(INSTALLED_APPS) +INSTALLED_APPS = list(INSTALLED_APPS) # noqa: F405 INSTALLED_APPS.append('mistraldashboard') diff --git a/test-requirements.txt b/test-requirements.txt index c737881..76f60f9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,8 +2,8 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -# Hacking already pins down pep8, pyflakes and flake8 -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +# hacking should appear first in case something else depends on pep8 +hacking>=4.0.0,<4.1.0 # Apache-2.0 # Testing Requirements coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 3c7cb91..1489863 100644 --- a/tox.ini +++ b/tox.ini @@ -2,16 +2,16 @@ minversion = 2.0 envlist = pep8,py37 skipsdist = True +ignore_basepython_conflict = true [testenv] basepython = python3 usedevelop = True -install_command = pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/ussuri} {opts} {packages} setenv = VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/requirements.txt +deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/ussuri} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - http://tarballs.openstack.org/horizon/horizon-master.tar.gz commands = find . -type f -name "*.pyc" -delete /bin/bash run_tests.sh -N --no-pep8 {posargs}