diff --git a/test-requirements.txt b/test-requirements.txt index 4ad76982a..698e43634 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ openstackdocstheme>=1.18.1 # Apache-2.0 -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 docutils>=0.11 # OSI-Approved Open Source, Public Domain diff --git a/tripleo_common/actions/derive_params.py b/tripleo_common/actions/derive_params.py index 562ef7b88..5f5d513c6 100644 --- a/tripleo_common/actions/derive_params.py +++ b/tripleo_common/actions/derive_params.py @@ -313,8 +313,8 @@ class GetDpdkSocketMemoryAction(base.TripleOAction): not nics_info['mtu'] in distinct_mtu_per_node): distinct_mtu_per_node.append(nics_info['mtu']) roundup_mtu = self.roundup_mtu_bytes(nics_info['mtu']) - socket_memory += (((roundup_mtu + overhead) - * packet_size_in_buffer) / + socket_memory += (((roundup_mtu + overhead) * + packet_size_in_buffer) / (1024 * 1024)) # For Non DPDK numa node diff --git a/tripleo_common/image/kolla_builder.py b/tripleo_common/image/kolla_builder.py index 8624f79a5..893f6f267 100644 --- a/tripleo_common/image/kolla_builder.py +++ b/tripleo_common/image/kolla_builder.py @@ -297,8 +297,8 @@ def container_images_prepare(template_file=DEFAULT_TEMPLATE_FILE, imagename = entry.get('imagename', '') append_tag = '' if modify_role and ( - (not modify_only_with_labels) - or imagename in images_with_labels): + (not modify_only_with_labels) or + imagename in images_with_labels): entry['modify_role'] = modify_role if modify_append_tag: entry['modify_append_tag'] = modify_append_tag diff --git a/tripleo_common/tests/test_filters.py b/tripleo_common/tests/test_filters.py index 854f71cc2..a935e939b 100644 --- a/tripleo_common/tests/test_filters.py +++ b/tripleo_common/tests/test_filters.py @@ -27,7 +27,7 @@ if 'nova' not in sys.modules: else: raise RuntimeError('nova module already found in sys.modules. The ' 'fake_nova injection should be removed.') -from tripleo_common.filters import capabilities_filter +from tripleo_common.filters import capabilities_filter # noqa class TestCapabilitiesFilter(base.TestCase): diff --git a/tripleo_common/utils/config.py b/tripleo_common/utils/config.py index 3dcf6a3d2..15d0a6f10 100644 --- a/tripleo_common/utils/config.py +++ b/tripleo_common/utils/config.py @@ -318,8 +318,8 @@ class Config(object): nested_depth=constants.NESTED_DEPTH, filters=dict(physical_resource_id=parent_stack)) if not resources: - message = "The deployment resource grandparent name could" \ - "not be determined." + message = "The deployment resource grandparent name" \ + "could not be determined." raise ValueError(message) deployment_name = resources[0].resource_name config_dict['deployment_name'] = deployment_name diff --git a/tripleo_common/utils/swift.py b/tripleo_common/utils/swift.py index d5fa06a9a..ae7048593 100644 --- a/tripleo_common/utils/swift.py +++ b/tripleo_common/utils/swift.py @@ -83,9 +83,9 @@ def download_container(swiftclient, container, dest, # write file if `overwrite_only_newer` is not set, # or if file does not exist at destination, # or if we found a newer file at source - if (not overwrite_only_newer - or not already_exists - or (overwrite_only_newer and is_newer)): + if (not overwrite_only_newer or + not already_exists or + (overwrite_only_newer and is_newer)): if not os.path.exists(dirname): os.makedirs(dirname)