Fix pep8 failures

This commit is contained in:
Ben Nemec 2018-09-12 22:46:06 +00:00
parent 95685f540b
commit a2b7d05255
3 changed files with 9 additions and 8 deletions

View File

@ -16,19 +16,21 @@
from oslo_upgradecheck import upgradecheck
class Checks(upgradecheck.UpgradeCommands):
def success(self):
return upgradecheck.UpgradeCheckResult(upgradecheck.UpgradeCheckCode.SUCCESS,
'Always succeeds')
return upgradecheck.UpgradeCheckResult(
upgradecheck.UpgradeCheckCode.SUCCESS, 'Always succeeds')
def failure(self):
return upgradecheck.UpgradeCheckResult(upgradecheck.UpgradeCheckCode.FAILURE,
'Always fails')
return upgradecheck.UpgradeCheckResult(
upgradecheck.UpgradeCheckCode.FAILURE, 'Always fails')
_upgrade_checks = (('always succeeds', success),
('always fails', failure),
)
def main():
inst = Checks()
upgradecheck.main(inst.check)

View File

@ -29,5 +29,6 @@ _C = _translators.contextual_form
# requires oslo.i18n >=2.1.0
_P = _translators.plural_form
def get_available_languages():
return oslo_i18n.get_available_languages(DOMAIN)

View File

@ -25,9 +25,7 @@ from oslo_upgradecheck._i18n import _
class UpgradeCheckCode(enum.IntEnum):
"""These are the status codes for the nova-status upgrade check command
and internal check commands.
"""
"""Status codes for the upgrade check command"""
# All upgrade readiness checks passed successfully and there is
# nothing to do.
@ -51,6 +49,7 @@ UPGRADE_CHECK_MSG_MAP = {
class UpgradeCheckResult(object):
"""Class used for 'nova-status upgrade check' results.
The 'code' attribute is an UpgradeCheckCode enum.
The 'details' attribute is a translated message generally only used for
checks that result in a warning or failure code. The details should provide
@ -63,7 +62,6 @@ class UpgradeCheckResult(object):
self.details = details
class UpgradeCommands(object):
_upgrade_checks = ()