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
This commit is contained in:
parent
90b2b36978
commit
bf1824a8b2
|
@ -16,7 +16,7 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
class BaseDataModel(object):
|
class BaseDataModel():
|
||||||
def to_dict(self, calling_classes=None, recurse=False,
|
def to_dict(self, calling_classes=None, recurse=False,
|
||||||
render_unsets=False, **kwargs):
|
render_unsets=False, **kwargs):
|
||||||
"""Converts a data model to a dictionary."""
|
"""Converts a data model to a dictionary."""
|
||||||
|
@ -82,7 +82,7 @@ class BaseDataModel(object):
|
||||||
return cls(**dict)
|
return cls(**dict)
|
||||||
|
|
||||||
|
|
||||||
class UnsetType(object):
|
class UnsetType():
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
return False
|
return False
|
||||||
__nonzero__ = __bool__
|
__nonzero__ = __bool__
|
||||||
|
|
|
@ -30,7 +30,7 @@ SOCKET_TIMEOUT = 5
|
||||||
DRIVER_AGENT_TIMEOUT = 30
|
DRIVER_AGENT_TIMEOUT = 30
|
||||||
|
|
||||||
|
|
||||||
class DriverLibrary(object):
|
class DriverLibrary():
|
||||||
|
|
||||||
@tenacity.retry(
|
@tenacity.retry(
|
||||||
stop=tenacity.stop_after_attempt(30), reraise=True,
|
stop=tenacity.stop_after_attempt(30), reraise=True,
|
||||||
|
|
|
@ -18,7 +18,7 @@ from octavia_lib.api.drivers import exceptions
|
||||||
# Load balancing provider drivers will implement this interface.
|
# 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 is for internal Octavia use and should not be used by drivers
|
||||||
name = None
|
name = None
|
||||||
|
|
||||||
|
|
|
@ -92,14 +92,14 @@ def _check_namespace_imports(failure_code, namespace, new_ns, logical_line,
|
||||||
logical_line.replace('%s.' % namespace, new_ns),
|
logical_line.replace('%s.' % namespace, new_ns),
|
||||||
logical_line)
|
logical_line)
|
||||||
return (0, msg_o or msg)
|
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'.") % (
|
msg = ("%s: '%s' must be used instead of '%s'.") % (
|
||||||
failure_code,
|
failure_code,
|
||||||
logical_line.replace(
|
logical_line.replace(
|
||||||
'from %s import ' % namespace, 'import %s' % new_ns),
|
'from %s import ' % namespace, 'import %s' % new_ns),
|
||||||
logical_line)
|
logical_line)
|
||||||
return (0, msg_o or msg)
|
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'.") % (
|
msg = ("%s: '%s' must be used instead of '%s'.") % (
|
||||||
failure_code,
|
failure_code,
|
||||||
logical_line.replace('import', 'from').replace('.', ' import '),
|
logical_line.replace('import', 'from').replace('.', ' import '),
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
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
|
coverage>=4.0,!=4.4 # Apache-2.0
|
||||||
doc8>=0.6.0 # 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
|
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||||
oslo.utils>=3.33.0 # Apache-2.0
|
oslo.utils>=3.33.0 # Apache-2.0
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
|
|
Loading…
Reference in New Issue