diff --git a/CMake/sbk_list_typesystem_sources.py b/CMake/sbk_list_typesystem_sources.py index 55ca4bcc884c5288be66a9c33b56a3a1f6e256d2..d2aad1cf09b73588351d63c3d87caae98467eacc 100644 --- a/CMake/sbk_list_typesystem_sources.py +++ b/CMake/sbk_list_typesystem_sources.py @@ -61,7 +61,7 @@ class typesystem_parser(xml.sax.ContentHandler): generate = True if ('generate' in attrs): generate = (attrs['generate'].lower() == "yes") - if(generate): + if (generate): self.printWrapperFiles(self.current_namespace) elif name in class_types: @@ -72,7 +72,7 @@ class typesystem_parser(xml.sax.ContentHandler): generate = True if ('generate' in attrs): generate = (attrs['generate'].lower() == "yes") - if(generate): + if (generate): self.printWrapperFiles(self.current_namespace) def endElement(self, name): diff --git a/smtk/attribute/testing/python/copyDefinitionTest.py b/smtk/attribute/testing/python/copyDefinitionTest.py index c24aeb8b2f8b5c3f4600a6af8df299d7689cd85a..83eaff6b19ebcb2fcfdc9076b03a6161d8815260 100644 --- a/smtk/attribute/testing/python/copyDefinitionTest.py +++ b/smtk/attribute/testing/python/copyDefinitionTest.py @@ -92,28 +92,28 @@ if __name__ == '__main__': # Add explicit test for conditional children defn = test_resource.findDefinition('SecondConcrete') - assert(defn is not None) + assert (defn is not None) # First selection list i = defn.findItemPosition('SelectionList') - assert(i >= 0) + assert (i >= 0) select_item_def = defn.itemDefinition(i) - assert(select_item_def.name() == 'SelectionList') - assert(select_item_def.isDiscrete()) - assert(not select_item_def.hasDefault()) + assert (select_item_def.name() == 'SelectionList') + assert (select_item_def.isDiscrete()) + assert (not select_item_def.hasDefault()) # Second selection list (with conditional children) i = defn.findItemPosition('ConditionalSelectionList') - assert(i >= 0) + assert (i >= 0) cond_item_def = defn.itemDefinition(i) - assert(cond_item_def is not None) - assert(cond_item_def.hasDefault()) + assert (cond_item_def is not None) + assert (cond_item_def.hasDefault()) list_one = cond_item_def.conditionalItems('One') - assert(len(list_one) == 1) + assert (len(list_one) == 1) list_two = cond_item_def.conditionalItems('Two') - assert(len(list_two) == 3) + assert (len(list_two) == 3) # Note there is ALOT more that could & should be verified here logging.debug('Writing resource') diff --git a/smtk/attribute/testing/python/unitAttributeBasics.py b/smtk/attribute/testing/python/unitAttributeBasics.py index 3347a82761351e4b33a5622649029a5f5d075dc3..c7ee7466c9c74933cb08464246653a10009be2e1 100644 --- a/smtk/attribute/testing/python/unitAttributeBasics.py +++ b/smtk/attribute/testing/python/unitAttributeBasics.py @@ -103,41 +103,41 @@ if __name__ == '__main__': att.setUserData("dataString", dataS) data = att.userData("bar") if data is not None: - print ("Should not have found user data bar.\n") + print("Should not have found user data bar.\n") status = -1 data = att.userData("dataInt") if data is None: - print ("Can not find user data dataInt.\n") + print("Can not find user data dataInt.\n") status = -1 else: if data.value() != 10: - print ("dataInt is not 10.\n") + print("dataInt is not 10.\n") status = -1 data = att.userData("dataString") if data is None: - print ("Can not find user data dataString.\n") + print("Can not find user data dataString.\n") status = -1 else: if data.value() != "foo": - print ("dataString is not foo.\n") + print("dataString is not foo.\n") status = -1 att.clearUserData("dataInt") data = att.userData("dataInt") if data is not None: - print ("Found user data dataInt after trying to clear it.\n") + print("Found user data dataInt after trying to clear it.\n") status = -1 data = att.userData("dataString") if data is None: - print ( + print( "Can not find user data dataString after removing dataInt from user data.\n") status = -1 att.clearAllUserData() data = att.userData("dataString") if data is not None: - print ("Found user data dataString after removing all user data.\n") + print("Found user data dataString after removing all user data.\n") status = -1 if status == 0: - print ("Passed all User Data Tests.\n") + print("Passed all User Data Tests.\n") # if att.resource() is not None: # print("Should not be null.\n") # status = -1 diff --git a/smtk/extension/vtk/io/testing/python/unitImportExportVTKData.py b/smtk/extension/vtk/io/testing/python/unitImportExportVTKData.py index d12fa472a053f5d591cc52cf210ed075f6ff66fe..f31bff288cd2babfdff831587e02efd859ab6a97 100644 --- a/smtk/extension/vtk/io/testing/python/unitImportExportVTKData.py +++ b/smtk/extension/vtk/io/testing/python/unitImportExportVTKData.py @@ -95,8 +95,8 @@ def make_MixedVolUGrid(): def test_same_datasets(ds, ds2): EPSILON = 1.e-6 - assert(ds.GetNumberOfPoints() == ds2.GetNumberOfPoints()) - assert(ds.GetNumberOfCells() == ds2.GetNumberOfCells()) + assert (ds.GetNumberOfPoints() == ds2.GetNumberOfPoints()) + assert (ds.GetNumberOfCells() == ds2.GetNumberOfCells()) it = ds.NewCellIterator() it2 = ds2.NewCellIterator() @@ -105,8 +105,8 @@ def test_same_datasets(ds, ds2): while True: if it.IsDoneWithTraversal() or it2.IsDoneWithTraversal(): break - assert(it.GetCellType() == it2.GetCellType()) - assert(it.GetNumberOfPoints() == it2.GetNumberOfPoints()) + assert (it.GetCellType() == it2.GetCellType()) + assert (it.GetNumberOfPoints() == it2.GetNumberOfPoints()) points = it.GetPoints() points2 = it2.GetPoints() xyz = [0., 0., 0.] @@ -115,7 +115,7 @@ def test_same_datasets(ds, ds2): points.GetPoint(i, xyz) points2.GetPoint(i, xyz2) for j in range(3): - assert(abs(xyz[j] - xyz2[j]) < EPSILON) + assert (abs(xyz[j] - xyz2[j]) < EPSILON) it.GoToNextCell() it2.GoToNextCell() diff --git a/smtk/mesh/testing/python/meshMetrics.py b/smtk/mesh/testing/python/meshMetrics.py index 5d95e0ee7957b49634664e10a416911c90c85958..953c4903a06b154e5c00d4d3c90990806fdefede 100644 --- a/smtk/mesh/testing/python/meshMetrics.py +++ b/smtk/mesh/testing/python/meshMetrics.py @@ -34,15 +34,15 @@ def test_mesh_metrics(): tolerance = 1.e-8 for i in range(0, 6): if i % 2 == 0: - assert(abs(ext[i] + .5) < tolerance) + assert (abs(ext[i] + .5) < tolerance) else: - assert(abs(ext[i] - .5) < tolerance) + assert (abs(ext[i] - .5) < tolerance) dim = smtk.mesh.highestDimension(mr.meshes()) - assert(dim == smtk.mesh.Dims3) + assert (dim == smtk.mesh.Dims3) euler_characteristic = smtk.mesh.eulerCharacteristic(mr.meshes()) - assert(euler_characteristic == 0) + assert (euler_characteristic == 0) if __name__ == '__main__': diff --git a/smtk/operation/pybind11/__init__.py b/smtk/operation/pybind11/__init__.py index 92507d6e96914321bb25510dc35ad5ec0ca5d887..54495cdc55785f504f33f166a41a570b508909de 100644 --- a/smtk/operation/pybind11/__init__.py +++ b/smtk/operation/pybind11/__init__.py @@ -143,7 +143,7 @@ def configureAttribute(attr, config): resourceMap[rsrc.name()] = rsrc # build_attribute expects the resource map as an arg. if config.get("resources") is not None: - del(config["resources"]) + del (config["resources"]) if config.get("resourceManager") is not None: - del(config["resourceManager"]) + del (config["resourceManager"]) builder.build_attribute(attr, config, resourceMap) diff --git a/smtk/operation/testing/python/testConstructedAPI.py b/smtk/operation/testing/python/testConstructedAPI.py index 7cce1703fea9fa665f639d54a7c8a506280d02a2..244a08d6740c6070d0e254cfb7bac652d51f385c 100644 --- a/smtk/operation/testing/python/testConstructedAPI.py +++ b/smtk/operation/testing/python/testConstructedAPI.py @@ -22,19 +22,19 @@ class TestConstructedAPI(smtk.testing.TestCase): def testConstructedAPI(self): op = smtk.operation.WriteResource.create() parameters = op.parameters() - assert(hasattr(parameters, 'setFilename')) - assert(hasattr(parameters, 'filename')) + assert (hasattr(parameters, 'setFilename')) + assert (hasattr(parameters, 'filename')) filename = 'foo.smtk' parameters.setFilename(filename) - assert(parameters.filename() == filename) - assert(hasattr(parameters, 'setDebugLevel')) - assert(hasattr(parameters, 'debugLevel')) - assert(hasattr(parameters, 'enableDebugLevel')) - assert(hasattr(parameters, 'debugLevelEnabled')) + assert (parameters.filename() == filename) + assert (hasattr(parameters, 'setDebugLevel')) + assert (hasattr(parameters, 'debugLevel')) + assert (hasattr(parameters, 'enableDebugLevel')) + assert (hasattr(parameters, 'debugLevelEnabled')) parameters.enableDebugLevel(True) - assert(parameters.debugLevelEnabled() == True) + assert (parameters.debugLevelEnabled() == True) parameters.setDebugLevel(3) - assert(parameters.debugLevel() == 3) + assert (parameters.debugLevel() == 3) if __name__ == '__main__': diff --git a/smtk/resource/testing/python/testResource.py b/smtk/resource/testing/python/testResource.py index e1fb98b86e07585aa4478e2a41da87b072c0addb..9dab006c258aca4dbd75ad6631bea68ecf19a2be 100644 --- a/smtk/resource/testing/python/testResource.py +++ b/smtk/resource/testing/python/testResource.py @@ -82,7 +82,7 @@ def test_python_resource(): myComponent = myResource.newComponent() alsoMyComponent = myResource.find(myComponent.id()) - assert(myComponent == alsoMyComponent) + assert (myComponent == alsoMyComponent) if __name__ == '__main__': diff --git a/smtk/smtk/attribute_builder.py b/smtk/smtk/attribute_builder.py index a2b68c15acf0055822e5019fdc5d466049f2805f..b3352f6729312b9b5643a72fea61fb1f1d62924e 100644 --- a/smtk/smtk/attribute_builder.py +++ b/smtk/smtk/attribute_builder.py @@ -444,7 +444,7 @@ class AttributeBuilder: return att_list[0] # (else) - raise('failed to find attribute with spec {}'.format(spec)) + raise ('failed to find attribute with spec {}'.format(spec)) def _is_reference_item(self, item): """"""