diff --git a/packages/seacas/scripts/exodus3.in.py b/packages/seacas/scripts/exodus3.in.py index ef08aaad24..2f202115a4 100644 --- a/packages/seacas/scripts/exodus3.in.py +++ b/packages/seacas/scripts/exodus3.in.py @@ -5783,7 +5783,7 @@ def __ex_put_block( numAttrsPerElem): obj_type = ctypes.c_int(get_entity_type(object_type)) block_id = ctypes.c_longlong(object_id) - if type(eType) is str: + if isinstance(eType, str): eType = eType.encode('ascii') elem_type = ctypes.create_string_buffer(eType.upper(), MAX_NAME_LENGTH + 1) num_elem_this_blk = ctypes.c_longlong(numElems) diff --git a/packages/seacas/scripts/exomerge3.py b/packages/seacas/scripts/exomerge3.py index 6eccbd5f20..ea45fa7f01 100644 --- a/packages/seacas/scripts/exomerge3.py +++ b/packages/seacas/scripts/exomerge3.py @@ -1432,7 +1432,7 @@ def _convert_side_set_to_triangle_block(self, 1) * nodes_per_element] local_node = tuple(local_node[x] for x in face_element_map[1]) - if not face_element_map[0] in faces: + if face_element_map[0] not in faces: faces[face_element_map[0]] = [local_node] else: faces[face_element_map[0]].append(local_node) @@ -6545,7 +6545,7 @@ def _replace_name_case(self, new_list, original_list): 'identical lowercase representations. One will be ' 'chosen at random.') for item in new_list: - if not item.lower() in original_case: + if item.lower() not in original_case: self._bug( 'Unrecognized string.', 'The string "%s" appears in the new list but ' diff --git a/packages/seacas/scripts/tests/exomerge_unit_test.py b/packages/seacas/scripts/tests/exomerge_unit_test.py index 39133f541b..b8ce325d62 100755 --- a/packages/seacas/scripts/tests/exomerge_unit_test.py +++ b/packages/seacas/scripts/tests/exomerge_unit_test.py @@ -2,10 +2,11 @@ """ This file performs unit tests of functions within Exomerge. -Copyright 2018, 2021, 2022 National Technology and Engineering Solutions of Sandia. Under -the terms of Contract DE-NA-0003525, there is a non-exclusive license for use -of this work by or on behalf of the U.S. Government. Export of this program -may require a license from the United States Government. +Copyright 2018, 2021, 2022 National Technology and Engineering +Solutions of Sandia. Under the terms of Contract DE-NA-0003525, there +is a non-exclusive license for use of this work by or on behalf of the +U.S. Government. Export of this program may require a license from +the United States Government. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1783,7 +1784,7 @@ def test(self): matched_unit_tests = [] for unit_test in unit_tests: (test, _) = unit_test - if not test[6:] in public_functions: + if test[6:] not in public_functions: unmatched.append(test) else: matched_unit_tests.append(unit_test) @@ -1803,7 +1804,7 @@ def test(self): unmatched = [] unit_test_names = [x[0] for x in unit_tests] for name in public_functions: - if not "_test_" + name in unit_test_names: + if "_test_" + name not in unit_test_names: unmatched.append(name) if unmatched: print(