Browse Source

Update test-requirements to match Octavia repo

pylint needed an update to be >=2.2.0 to fix a pep8 issue,
updated bandit requirement to match Octavia repo while
we're at it.

Had to fix some new errors pylint found as a result.

Change-Id: I7ebdd5eea537a8258f66b5e1bf2ee1aad3f8b10b
changes/55/741455/2
Brian Haley 1 year ago
parent
commit
bf1824a8b2
  1. 4
      octavia_lib/api/drivers/data_models.py
  2. 2
      octavia_lib/api/drivers/driver_lib.py
  3. 2
      octavia_lib/api/drivers/provider_base.py
  4. 4
      octavia_lib/hacking/checks.py
  5. 4
      test-requirements.txt

4
octavia_lib/api/drivers/data_models.py

@ -16,7 +16,7 @@
# under the License.
class BaseDataModel(object):
class BaseDataModel():
def to_dict(self, calling_classes=None, recurse=False,
render_unsets=False, **kwargs):
"""Converts a data model to a dictionary."""
@ -82,7 +82,7 @@ class BaseDataModel(object):
return cls(**dict)
class UnsetType(object):
class UnsetType():
def __bool__(self):
return False
__nonzero__ = __bool__

2
octavia_lib/api/drivers/driver_lib.py

@ -30,7 +30,7 @@ SOCKET_TIMEOUT = 5
DRIVER_AGENT_TIMEOUT = 30
class DriverLibrary(object):
class DriverLibrary():
@tenacity.retry(
stop=tenacity.stop_after_attempt(30), reraise=True,

2
octavia_lib/api/drivers/provider_base.py

@ -18,7 +18,7 @@ from octavia_lib.api.drivers import exceptions
# Load balancing provider drivers will implement this interface.
class ProviderDriver(object):
class ProviderDriver():
# name is for internal Octavia use and should not be used by drivers
name = None

4
octavia_lib/hacking/checks.py

@ -92,14 +92,14 @@ def _check_namespace_imports(failure_code, namespace, new_ns, logical_line,
logical_line.replace('%s.' % namespace, new_ns),
logical_line)
return (0, msg_o or msg)
elif _check_imports(namespace_imports_from_root, namespace, logical_line):
if _check_imports(namespace_imports_from_root, namespace, logical_line):
msg = ("%s: '%s' must be used instead of '%s'.") % (
failure_code,
logical_line.replace(
'from %s import ' % namespace, 'import %s' % new_ns),
logical_line)
return (0, msg_o or msg)
elif _check_imports(namespace_imports_dot, namespace, logical_line):
if _check_imports(namespace_imports_dot, namespace, logical_line):
msg = ("%s: '%s' must be used instead of '%s'.") % (
failure_code,
logical_line.replace('import', 'from').replace('.', ' import '),

4
test-requirements.txt

@ -4,10 +4,10 @@
hacking>=3.0.1,<3.1.0 # Apache-2.0
bandit>=1.1.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0
coverage>=4.0,!=4.4 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
pylint==1.9.2 # GPLv2
pylint>=2.2.0 # GPLv2
python-subunit>=1.0.0 # Apache-2.0/BSD
oslo.utils>=3.33.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0

Loading…
Cancel
Save