From e18364ed2c4e2bc4afadb1b4a9c8797c6de87844 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Tue, 22 Nov 2022 01:12:53 +0000 Subject: [PATCH] Fix openstack-tox jobs for ha repo The Zuul upper-constraints env variable declaration needed to be added to tox.ini otherwise an older constraints was being used which does not work with newer versions of python. Needed to suppress bugbear error B009 also, due to newer version of flake8-bugbear. Partial-Bug: #1997255 Signed-off-by: Al Bailey Change-Id: I73f4fbbf51a09f1e4c1a633a7a8b62cf969ff33a --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 829d1aac..2ef75ce4 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ skipsdist = True [testenv] install_command = pip install \ - -chttps://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ {opts} {packages} setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 @@ -83,13 +83,14 @@ commands = # F901 'raise NotImplemented' should be 'raise NotImplementedError' # - bugbear - # B008 Do not perform calls in argument defaults. The call is performed only once at function definition time. +# B009 Do not call getattr with a constant attribute value, it is not any safer than normal property access. # B014 Redundant exception types ignore= E402, H102,H104,H105,H106,H306,H401,H403,H404,H405,H501, W504,W605, E741, F811,F821,F841,F901, - B008,B014 + B008,B009,B014 # Enable checks which are off by default # H106 Don’t put vim configuration in source files (off by default). SHOULD BE ENABLED. # H203 Use assertIs(Not)None to check for None (off by default).