Fix for yapf v0.24.0
This PS fixes yapf v0.24.0 errors. Also updates tox.ini and test-requirements.txt accordingly. Change-Id: If1dd0e51d328ad976bf0a7bfd512425c4da4ac0a
This commit is contained in:
parent
80e513219b
commit
63e63a3c30
|
@ -127,7 +127,5 @@ class Rollback(CliAction):
|
||||||
self.output(response)
|
self.output(response)
|
||||||
|
|
||||||
def output(self, response):
|
def output(self, response):
|
||||||
self.logger.info(
|
self.logger.info(('(dry run) ' if self.dry_run else '') +
|
||||||
('(dry run) '
|
'Rollback of %s complete.', self.release)
|
||||||
if self.dry_run else '') + 'Rollback of %s complete.',
|
|
||||||
self.release)
|
|
||||||
|
|
|
@ -63,9 +63,9 @@ class ChartBuilder(object):
|
||||||
property from the chart, or else "" if the property isn't a 2-tuple.
|
property from the chart, or else "" if the property isn't a 2-tuple.
|
||||||
'''
|
'''
|
||||||
source_dir = self.chart.get('source_dir')
|
source_dir = self.chart.get('source_dir')
|
||||||
return (os.path.join(*source_dir)
|
return (os.path.join(*source_dir) if
|
||||||
if (source_dir and isinstance(source_dir, (list, tuple)) and
|
(source_dir and isinstance(source_dir, (list, tuple)) and
|
||||||
len(source_dir) == 2) else "")
|
len(source_dir) == 2) else "")
|
||||||
|
|
||||||
def get_ignored_files(self):
|
def get_ignored_files(self):
|
||||||
'''Load files to ignore from .helmignore if present.'''
|
'''Load files to ignore from .helmignore if present.'''
|
||||||
|
|
|
@ -140,10 +140,10 @@ data:
|
||||||
enabled: true
|
enabled: true
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CHART_SOURCES = [('git://github.com/dummy/armada',
|
CHART_SOURCES = [('git://github.com/dummy/armada', 'chart_1'),
|
||||||
'chart_1'), ('/tmp/dummy/armada', 'chart_2'),
|
('/tmp/dummy/armada', 'chart_2'),
|
||||||
('/tmp/dummy/armada', 'chart_3'), ('/tmp/dummy/armada',
|
('/tmp/dummy/armada', 'chart_3'),
|
||||||
'chart_4')]
|
('/tmp/dummy/armada', 'chart_4')]
|
||||||
|
|
||||||
|
|
||||||
class ArmadaHandlerTestCase(base.ArmadaTestCase):
|
class ArmadaHandlerTestCase(base.ArmadaTestCase):
|
||||||
|
@ -263,7 +263,7 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
|
||||||
False
|
False
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
} # yapf: disable
|
||||||
|
|
||||||
self.assertTrue(hasattr(armada_obj, 'manifest'))
|
self.assertTrue(hasattr(armada_obj, 'manifest'))
|
||||||
self.assertIsInstance(armada_obj.manifest, dict)
|
self.assertIsInstance(armada_obj.manifest, dict)
|
||||||
|
@ -384,8 +384,8 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
|
||||||
mock.call(
|
mock.call(
|
||||||
mock_chartbuilder().get_helm_chart(),
|
mock_chartbuilder().get_helm_chart(),
|
||||||
"{}-{}".format(
|
"{}-{}".format(
|
||||||
armada_obj.manifest['armada'][
|
armada_obj.manifest['armada']
|
||||||
'release_prefix'], chart['release']),
|
['release_prefix'], chart['release']),
|
||||||
chart['namespace'],
|
chart['namespace'],
|
||||||
values=yaml.safe_dump(chart['values']),
|
values=yaml.safe_dump(chart['values']),
|
||||||
wait=this_chart_should_wait,
|
wait=this_chart_should_wait,
|
||||||
|
@ -407,8 +407,8 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
|
||||||
mock.call(
|
mock.call(
|
||||||
mock_chartbuilder().get_helm_chart(),
|
mock_chartbuilder().get_helm_chart(),
|
||||||
"{}-{}".format(
|
"{}-{}".format(
|
||||||
armada_obj.manifest['armada'][
|
armada_obj.manifest['armada']
|
||||||
'release_prefix'],
|
['release_prefix'],
|
||||||
chart['release']),
|
chart['release']),
|
||||||
chart['namespace'],
|
chart['namespace'],
|
||||||
values=yaml.safe_dump(chart['values']),
|
values=yaml.safe_dump(chart['values']),
|
||||||
|
@ -436,8 +436,8 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
|
||||||
mock.call(
|
mock.call(
|
||||||
mock_chartbuilder().get_helm_chart(),
|
mock_chartbuilder().get_helm_chart(),
|
||||||
"{}-{}".format(
|
"{}-{}".format(
|
||||||
armada_obj.manifest['armada'][
|
armada_obj.manifest['armada']
|
||||||
'release_prefix'],
|
['release_prefix'],
|
||||||
chart['release']),
|
chart['release']),
|
||||||
chart['namespace'],
|
chart['namespace'],
|
||||||
pre_actions={},
|
pre_actions={},
|
||||||
|
|
|
@ -13,5 +13,4 @@ os-testr>=1.0.0 # Apache-2.0
|
||||||
flake8>=3.3.0
|
flake8>=3.3.0
|
||||||
mock
|
mock
|
||||||
responses>=0.8.1
|
responses>=0.8.1
|
||||||
# TODO: Resolve issues with >=0.24.0
|
yapf
|
||||||
yapf<=0.23.0
|
|
||||||
|
|
Loading…
Reference in New Issue