From 9e6fd3c0b8810613b2b6154df818045710125593 Mon Sep 17 00:00:00 2001 From: Luis Eduardo Bonatti Date: Thu, 14 Dec 2023 11:33:42 -0300 Subject: [PATCH] Ensure all tox is passing This commit correct some issues returned by tox tests. The issues is only regard the flake8, the rest of the tests is working good. Test Plan: PASS: Run tox and all tests passed. Story: 2010676 Task: 49260 Change-Id: Iec32089ff31ca6cbe7ca70eb0596f0f33b3169b7 Signed-off-by: Luis Eduardo Bonatti --- software/software/exceptions.py | 3 +++ software/software/software_entities.py | 4 ++-- software/software/utils.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/software/software/exceptions.py b/software/software/exceptions.py index 4669137a..76ac172e 100644 --- a/software/software/exceptions.py +++ b/software/software/exceptions.py @@ -96,14 +96,17 @@ class StateValidationFailure(SoftwareError): """State Validation Failure""" pass + class DeployDoNotExist(SoftwareError): """Deploy Do Not Exist""" pass + class DeployAlreadyExist(SoftwareError): """Deploy Already Exist""" pass + class ReleaseVersionDoNotExist(SoftwareError): """Release Version Do Not Exist""" pass diff --git a/software/software/software_entities.py b/software/software/software_entities.py index d39d3c58..92b69110 100644 --- a/software/software/software_entities.py +++ b/software/software/software_entities.py @@ -6,7 +6,8 @@ SPDX-License-Identifier: Apache-2.0 """ import logging -from abc import ABC, abstractmethod +from abc import ABC +from abc import abstractmethod from enum import Enum from typing import List @@ -227,7 +228,6 @@ class DeployHosts(ABC): pass - class DeployHandler(Deploy): def __init__(self): super().__init__() diff --git a/software/software/utils.py b/software/software/utils.py index 8e6bf1d5..5191e0aa 100644 --- a/software/software/utils.py +++ b/software/software/utils.py @@ -292,7 +292,7 @@ def check_state(state, states): :param state: String value. :param states: An Enum object. """ - if not state in states.__members__: + if state not in states.__members__: msg = "State %s not in valid states: %s" % (state, list(states.__members__.keys())) LOG.exception(msg) raise StateValidationFailure(msg)