From 3f834e0c10ffeef677c57ca663a2ce816a4b54f5 Mon Sep 17 00:00:00 2001 From: John Stilley <1831479+john-science@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:52:05 -0700 Subject: [PATCH] Removing unused method arguments (#754) --- armi/bookkeeping/db/compareDB3.py | 11 +++----- armi/bookkeeping/memoryProfiler.py | 10 ++----- armi/bookkeeping/tests/test_memoryProfiler.py | 6 ++-- armi/cases/case.py | 6 +--- armi/cases/tests/test_cases.py | 2 +- armi/cli/checkInputs.py | 4 +-- armi/materials/material.py | 2 -- armi/mpiActions.py | 9 +++--- armi/reactor/blocks.py | 16 +++-------- armi/reactor/blueprints/blockBlueprint.py | 2 +- armi/reactor/components/__init__.py | 12 ++------ armi/reactor/converters/geometryConverters.py | 2 +- .../tests/test_geometryConverters.py | 4 +-- armi/reactor/grids.py | 1 - armi/reactor/tests/test_blocks.py | 28 ++++++------------- armi/reactor/tests/test_components.py | 4 +-- armi/reactor/tests/test_reactors.py | 2 +- armi/scripts/migration/m0_1_0_newDbFormat.py | 13 ++------- armi/utils/__init__.py | 9 ++---- armi/utils/pathTools.py | 15 ---------- 20 files changed, 42 insertions(+), 116 deletions(-) diff --git a/armi/bookkeeping/db/compareDB3.py b/armi/bookkeeping/db/compareDB3.py index 67202a802..423382ceb 100644 --- a/armi/bookkeeping/db/compareDB3.py +++ b/armi/bookkeeping/db/compareDB3.py @@ -243,7 +243,7 @@ def _compareTimeStep( ) for aux in auxData: - _compareAuxData(out, refGroup[aux], srcGroup[aux], diffResults, exclusions) + _compareAuxData(out, refGroup[aux], srcGroup[aux], diffResults) def _compareAuxData( @@ -251,7 +251,6 @@ def _compareAuxData( refGroup: h5py.Group, srcGroup: h5py.Group, diffResults: DiffResults, - exclusions: Sequence[Pattern], ): """ Compare auxiliary datasets, which aren't stored as Parameters on the Composite model. @@ -278,7 +277,7 @@ def visitor(name, obj): diffResults.addStructureDiffs(n) matchedSets = set(srcData.keys()) & set(refData.keys()) for name in matchedSets: - _diffSimpleData(refData[name], srcData[name], out, diffResults) + _diffSimpleData(refData[name], srcData[name], diffResults) def _compareSets( @@ -411,9 +410,7 @@ def _diffSpecialData( return -def _diffSimpleData( - ref: numpy.ndarray, src: numpy.ndarray, out: OutputWriter, diffResults: DiffResults -): +def _diffSimpleData(ref: numpy.ndarray, src: numpy.ndarray, diffResults: DiffResults): paramName = ref.name.split("/")[-1] compName = ref.name.split("/")[-2] @@ -489,4 +486,4 @@ def _compareComponentData( if srcSpecial or refSpecial: _diffSpecialData(refDataset, srcDataset, out, diffResults) else: - _diffSimpleData(refDataset, srcDataset, out, diffResults) + _diffSimpleData(refDataset, srcDataset, diffResults) diff --git a/armi/bookkeeping/memoryProfiler.py b/armi/bookkeeping/memoryProfiler.py index 0c3030019..18fdf92f5 100644 --- a/armi/bookkeeping/memoryProfiler.py +++ b/armi/bookkeeping/memoryProfiler.py @@ -117,9 +117,7 @@ def displayMemoryUsage(self, timeDescription): runLog.important( "----- Memory Usage Report at {} -----".format(timeDescription) ) - self._printFullMemoryBreakdown( - startsWith="", reportSize=self.cs["debugMemSize"] - ) + self._printFullMemoryBreakdown(reportSize=self.cs["debugMemSize"]) self._reactorAssemblyTrackingBreakdown() runLog.important( "----- End Memory Usage Report at {} -----".format(timeDescription) @@ -188,16 +186,12 @@ def checkAttr(subObj): ) raise RuntimeError - def _printFullMemoryBreakdown( - self, startsWith="armi", reportSize=True, printReferrers=False - ): + def _printFullMemoryBreakdown(self, reportSize=True, printReferrers=False): """ looks for any class from any module in the garbage collector and prints their count and size Parameters ---------- - startsWith : str, optional - limit to objects with classes that start with a certain string reportSize : bool, optional calculate size as well as counting individual objects. diff --git a/armi/bookkeeping/tests/test_memoryProfiler.py b/armi/bookkeeping/tests/test_memoryProfiler.py index f2b6f1c88..712c753e7 100644 --- a/armi/bookkeeping/tests/test_memoryProfiler.py +++ b/armi/bookkeeping/tests/test_memoryProfiler.py @@ -42,9 +42,7 @@ def test_fullBreakdown(self): # we should start at info level, and that should be working correctly self.assertEqual(runLog.LOG.getVerbosity(), logging.INFO) - self.memPro._printFullMemoryBreakdown( - startsWith="armi.physics", reportSize=False - ) + self.memPro._printFullMemoryBreakdown(reportSize=False) # do some basic testing self.assertTrue(mock._outputStream.count("UNIQUE_INSTANCE_COUNT") > 10) @@ -73,7 +71,7 @@ def test_printFullMemoryBreakdown(self): # we should start at info level, and that should be working correctly self.assertEqual(runLog.LOG.getVerbosity(), logging.INFO) - self.memPro._printFullMemoryBreakdown(startsWith="", reportSize=True) + self.memPro._printFullMemoryBreakdown(reportSize=True) # do some basic testing self.assertIn("UNIQUE_INSTANCE_COUNT", mock._outputStream) diff --git a/armi/cases/case.py b/armi/cases/case.py index 27b6577ff..8dc1f55db 100644 --- a/armi/cases/case.py +++ b/armi/cases/case.py @@ -494,9 +494,8 @@ def checkInputs(self): return not any(inspectorIssues) - def summarizeDesign(self, generateFullCoreMap=True, showBlockAxialMesh=True): + def summarizeDesign(self): """Uses the ReportInterface to create a fancy HTML page describing the design inputs.""" - _ = reportsEntryPoint.createReportFromSettings(self.cs) def buildCommand(self, python="python"): @@ -629,10 +628,7 @@ def compare( self, that, exclusion: Optional[Sequence[str]] = None, - weights=None, tolerance=0.01, - timestepMatchup=None, - output="", ) -> int: """ Compare the output databases from two run cases. Return number of differences. diff --git a/armi/cases/tests/test_cases.py b/armi/cases/tests/test_cases.py index 9936099a2..cc2dbcbe3 100644 --- a/armi/cases/tests/test_cases.py +++ b/armi/cases/tests/test_cases.py @@ -87,7 +87,7 @@ def test_summarizeDesign(self): cs = cs.modified(newSettings={"verbosity": "important"}) case = cases.Case(cs) c2 = case.clone() - c2.summarizeDesign(True, True) + c2.summarizeDesign() self.assertTrue( os.path.exists( os.path.join("{}-reports".format(c2.cs.caseTitle), "index.html") diff --git a/armi/cli/checkInputs.py b/armi/cli/checkInputs.py index 8173c0999..e644a3ca5 100644 --- a/armi/cli/checkInputs.py +++ b/armi/cli/checkInputs.py @@ -119,9 +119,7 @@ def invoke(self): hasIssues = "PASSED" if case.checkInputs() else "HAS ISSUES" try: if self.args.generate_design_summary: - case.summarizeDesign( - self.args.full_core_map, not self.args.disable_block_axial_mesh - ) + case.summarizeDesign() canStart = "PASSED" else: canStart = "UNKNOWN" diff --git a/armi/materials/material.py b/armi/materials/material.py index 272a75b2a..a7eaaae1a 100644 --- a/armi/materials/material.py +++ b/armi/materials/material.py @@ -441,7 +441,6 @@ def getLifeMetalConservativeFcciCoeff(self, Tk: float) -> float: """ Return the coefficient to be used in the LIFE-METAL correlation """ - return 0.0 def yieldStrength(self, Tk: float = None, Tc: float = None) -> float: @@ -500,7 +499,6 @@ def getMassFrac( Notes ----- - self.p.massFrac are modified mass fractions that may not add up to 1.0 (for instance, after a axial expansion, the modified mass fracs will sum to less than one. The alternative is to put a multiplier on the density. They're mathematically equivalent. diff --git a/armi/mpiActions.py b/armi/mpiActions.py index ac9bf1142..53c22e4b7 100644 --- a/armi/mpiActions.py +++ b/armi/mpiActions.py @@ -674,7 +674,6 @@ def _diagnosePickleError(o): We also find that modifying the Python library as documented here tells us which object can't be pickled by printing it out. - """ checker = utils.tryPickleOnAllContents3 runLog.info("-------- Pickle Error Detection -------") @@ -685,19 +684,19 @@ def _diagnosePickleError(o): ) ) runLog.info("Scanning the Reactor for pickle errors") - checker(o.r, verbose=True) + checker(o.r) runLog.info("Scanning All assemblies for pickle errors") for a in o.r.core.getAssemblies(includeAll=True): # pylint: disable=no-member - checker(a, ignore=["blockStack"]) + checker(a) runLog.info("Scanning all blocks for pickle errors") for b in o.r.core.getBlocks(includeAll=True): # pylint: disable=no-member - checker(b, ignore=["parentAssembly", "r"]) + checker(b) runLog.info("Scanning blocks by name for pickle errors") for _bName, b in o.r.core.blocksByName.items(): # pylint: disable=no-member - checker(b, ignore=["parentAssembly", "r"]) + checker(b) runLog.info("Scanning the ISOTXS library for pickle errors") checker(o.r.core.lib) # pylint: disable=no-member diff --git a/armi/reactor/blocks.py b/armi/reactor/blocks.py index b80796fe1..395beaabf 100644 --- a/armi/reactor/blocks.py +++ b/armi/reactor/blocks.py @@ -361,7 +361,7 @@ def getMgFlux(self, adjoint=False, average=False, volume=None, gamma=False): flux = (flux + lastFlux) / 2.0 return flux - def setPinMgFluxes(self, fluxes, numPins, adjoint=False, gamma=False): + def setPinMgFluxes(self, fluxes, adjoint=False, gamma=False): """ Store the pin-detailed multi-group neutron flux @@ -374,13 +374,8 @@ def setPinMgFluxes(self, fluxes, numPins, adjoint=False, gamma=False): The block-level pin multigroup fluxes. fluxes[g][i] represents the flux in group g for pin i. Flux units are the standard n/cm^2/s. The "ARMI pin ordering" is used, which is counter-clockwise from 3 o'clock. - - numPins : int - The number of pins in this block. - adjoint : bool, optional Whether to set real or adjoint data. - gamma : bool, optional Whether to set gamma or neutron data. @@ -573,8 +568,8 @@ def coords(self, rotationDegreesCCW=0.0): raise NotImplementedError("Cannot get coordinates with rotation.") return self.spatialLocator.getGlobalCoordinates() - def setBuLimitInfo(self, cs): - r"""Sets burnup limit based on igniter, feed, etc. (will implement general grouping later)""" + def setBuLimitInfo(self): + r"""Sets burnup limit based on igniter, feed, etc.""" if self.p.buRate == 0: # might be cycle 1 or a non-burning block self.p.timeToLimit = 0.0 @@ -1033,7 +1028,7 @@ def mergeWithBlock(self, otherBlock, fraction): self.setNumberDensities(newDensities) - def getComponentAreaFrac(self, typeSpec, exact=True): + def getComponentAreaFrac(self, typeSpec): """ Returns the area fraction of the specified component(s) among all components in the block. @@ -1041,8 +1036,6 @@ def getComponentAreaFrac(self, typeSpec, exact=True): ---------- typeSpec : Flags or list of Flags Component types to look up - exact : bool, optional - Match exact names only Examples --------- @@ -1054,7 +1047,6 @@ def getComponentAreaFrac(self, typeSpec, exact=True): float The area fraction of the component. """ - tFrac = sum(f for (c, f) in self.getVolumeFractions() if c.hasFlags(typeSpec)) if tFrac: diff --git a/armi/reactor/blueprints/blockBlueprint.py b/armi/reactor/blueprints/blockBlueprint.py index b861326b9..9925902fe 100644 --- a/armi/reactor/blueprints/blockBlueprint.py +++ b/armi/reactor/blueprints/blockBlueprint.py @@ -177,7 +177,7 @@ def construct( b.p.height = height b.p.heightBOL = height # for fuel performance b.p.xsType = xsType - b.setBuLimitInfo(cs) + b.setBuLimitInfo() b = self._mergeComponents(b) b.verifyBlockDims() b.spatialGrid = spatialGrid diff --git a/armi/reactor/components/__init__.py b/armi/reactor/components/__init__.py index a58ac5b5d..7e2ba2f9c 100644 --- a/armi/reactor/components/__init__.py +++ b/armi/reactor/components/__init__.py @@ -266,15 +266,11 @@ class ZeroMassComponent(UnshapedVolumetricComponent): """ def getNumberDensity(self, *args, **kwargs): - """ - Always return 0 because this component has not mass - """ + """Always return 0 because this component has not mass""" return 0.0 def setNumberDensity(self, *args, **kwargs): - """ - Never add mass - """ + """Never add mass""" pass @@ -288,9 +284,7 @@ class PositiveOrNegativeVolumeComponent(UnshapedVolumetricComponent): """ def _checkNegativeVolume(self, volume): - """ - Allow negative areas. - """ + """Allow negative areas.""" pass diff --git a/armi/reactor/converters/geometryConverters.py b/armi/reactor/converters/geometryConverters.py index 0605a4f89..b8a3c9382 100644 --- a/armi/reactor/converters/geometryConverters.py +++ b/armi/reactor/converters/geometryConverters.py @@ -1273,7 +1273,7 @@ def convert(self, r=None): geometry.DomainType.FULL_CORE, geometry.BoundaryType.NO_SYMMETRY ) - def restorePreviousGeometry(self, cs, r): + def restorePreviousGeometry(self, r): """Undo the changes made by convert by going back to 1/3 core.""" # remove the assemblies that were added when the conversion happened. if bool(self.getNewAssembliesAdded()): diff --git a/armi/reactor/converters/tests/test_geometryConverters.py b/armi/reactor/converters/tests/test_geometryConverters.py index 94061d4bb..755a00cc9 100644 --- a/armi/reactor/converters/tests/test_geometryConverters.py +++ b/armi/reactor/converters/tests/test_geometryConverters.py @@ -374,7 +374,7 @@ def test_growToFullCoreFromThirdCore(self): ) # Check that the geometry can be restored to a third core - changer.restorePreviousGeometry(self.o.cs, self.r) + changer.restorePreviousGeometry(self.r) self.assertEqual(initialNumBlocks, len(self.r.core.getBlocks())) self.assertEqual( self.r.core.symmetry, @@ -420,7 +420,7 @@ def test_skipGrowToFullCoreWhenAlreadyFullCore(self): changer.convert(self.r) self.assertEqual(self.r.core.symmetry.domain, geometry.DomainType.FULL_CORE) self.assertEqual(initialNumBlocks, len(self.r.core.getBlocks())) - changer.restorePreviousGeometry(self.o.cs, self.r) + changer.restorePreviousGeometry(self.r) self.assertEqual(initialNumBlocks, len(self.r.core.getBlocks())) self.assertEqual(self.r.core.symmetry.domain, geometry.DomainType.FULL_CORE) diff --git a/armi/reactor/grids.py b/armi/reactor/grids.py index 17238ef8c..e9447d3f7 100644 --- a/armi/reactor/grids.py +++ b/armi/reactor/grids.py @@ -1841,7 +1841,6 @@ def indicesOfBounds(self, rad0, rad1, theta0, theta1, sigma=1e-4): Returns ------- tuple : i, j, k of given bounds - """ i = int(numpy.abs(self._bounds[0] - theta0).argmin()) j = int(numpy.abs(self._bounds[1] - rad0).argmin()) diff --git a/armi/reactor/tests/test_blocks.py b/armi/reactor/tests/test_blocks.py index 0e640d8b6..edc528cd0 100644 --- a/armi/reactor/tests/test_blocks.py +++ b/armi/reactor/tests/test_blocks.py @@ -285,7 +285,7 @@ def applyDummyData(block): block.r.core.lib = xslib -def getComponentDataFromBlock(component, block): +def getComponentData(component): density = 0.0 for nuc in component.getNuclides(): density += ( @@ -772,19 +772,16 @@ def test_setLocation(self): self.assertEqual(b.getSymmetryFactor(), powerMult) def test_setBuLimitInfo(self): - cs = settings.getMasterCs() - self.block.adjustUEnrich(0.1) self.block.setType("igniter fuel") - self.block.setBuLimitInfo(cs) + self.block.setBuLimitInfo() cur = self.block.p.buLimit ref = 0.0 self.assertEqual(cur, ref) def test_getTotalNDens(self): - self.block.setType("fuel") self.block.clearNumberDensities() @@ -811,7 +808,6 @@ def test_getTotalNDens(self): self.assertAlmostEqual(cur, ref, places=places) def test_getHMDens(self): - self.block.setType("fuel") self.block.clearNumberDensities() refDict = { @@ -864,7 +860,6 @@ def test_getFissileMassEnrich(self): self.block.remove(self.fuelComponent) def test_getUraniumMassEnrich(self): - self.block.adjustUEnrich(0.25) ref = 0.25 @@ -876,7 +871,6 @@ def test_getUraniumMassEnrich(self): self.assertAlmostEqual(cur, ref, places=places) def test_getUraniumNumEnrich(self): - self.block.adjustUEnrich(0.25) cur = self.block.getUraniumNumEnrich() @@ -889,7 +883,6 @@ def test_getUraniumNumEnrich(self): self.assertAlmostEqual(cur, ref, places=places) def test_getNumberOfAtoms(self): - self.block.clearNumberDensities() refDict = { "U235": 0.00275173784234, @@ -941,7 +934,6 @@ def test_getPuN(self): self.assertAlmostEqual(cur, ref, places=places) def test_getPuMass(self): - fuel = self.block.getComponent(Flags.FUEL) refDict = { "AM241": 2.695633500634074e-05, @@ -963,7 +955,6 @@ def test_getPuMass(self): self.assertAlmostEqual(cur, pu) def test_adjustDensity(self): - u235Dens = 0.003 u238Dens = 0.010 self.block.setNumberDensity("U235", u235Dens) @@ -986,7 +977,6 @@ def test_adjustDensity(self): self.assertAlmostEqual(mass2 - mass1, massDiff) def test_completeInitialLoading(self): - area = self.block.getArea() height = 2.0 self.block.setHeight(height) @@ -1244,9 +1234,7 @@ def calcFracManually(names): self.assertAlmostEqual(cur, ref, places=places) # allow inexact for things like fuel1, fuel2 or clad vs. cladding - val = self.block.getComponentAreaFrac( - [Flags.COOLANT, Flags.INTERCOOLANT], exact=False - ) + val = self.block.getComponentAreaFrac([Flags.COOLANT, Flags.INTERCOOLANT]) ref = calcFracManually(["coolant", "interCoolant"]) refWrong = calcFracManually( ["coolant", "interCoolant", "clad"] @@ -1425,7 +1413,7 @@ def test_consistentMassDensityVolumeBetweenColdBlockAndColdComponents(self): expectedData = [] actualData = [] for c in block: - expectedData.append(getComponentDataFromBlock(c, block)) + expectedData.append(getComponentData(c)) actualData.append( (c, c.density(), c.getVolume(), c.density() * c.getVolume()) ) @@ -1442,7 +1430,7 @@ def test_consistentMassDensityVolumeBetweenHotBlockAndHotComponents(self): expectedData = [] actualData = [] for c in block: - expectedData.append(getComponentDataFromBlock(c, block)) + expectedData.append(getComponentData(c)) actualData.append( (c, c.density(), c.getVolume(), c.density() * c.getVolume()) ) @@ -1529,9 +1517,9 @@ def test_pinMgFluxes(self): .. warning:: This will likely be pushed to the component level. """ fluxes = numpy.ones((33, 10)) - self.block.setPinMgFluxes(fluxes, 10) - self.block.setPinMgFluxes(fluxes * 2, 10, adjoint=True) - self.block.setPinMgFluxes(fluxes * 3, 10, gamma=True) + self.block.setPinMgFluxes(fluxes) + self.block.setPinMgFluxes(fluxes * 2, adjoint=True) + self.block.setPinMgFluxes(fluxes * 3, gamma=True) self.assertEqual(self.block.p.pinMgFluxes[0][2], 1.0) self.assertEqual(self.block.p.pinMgFluxesAdj[0][2], 2.0) self.assertEqual(self.block.p.pinMgFluxesGamma[0][2], 3.0) diff --git a/armi/reactor/tests/test_components.py b/armi/reactor/tests/test_components.py index ca40e26db..bc34c0ba9 100644 --- a/armi/reactor/tests/test_components.py +++ b/armi/reactor/tests/test_components.py @@ -938,12 +938,12 @@ class TestHelix(TestShapedComponent): "id": 0.1, } - def test_getBoundingCircleOuterDiameter(self, Tc=None, cold=False): + def test_getBoundingCircleOuterDiameter(self): ref = 2.0 + 0.25 cur = self.component.getBoundingCircleOuterDiameter(cold=True) self.assertAlmostEqual(ref, cur) - def test_getCircleInnerDiameter(self, Tc=None, cold=False): + def test_getCircleInnerDiameter(self): ref = 2.0 - 0.25 cur = self.component.getCircleInnerDiameter(cold=True) self.assertAlmostEqual(ref, cur) diff --git a/armi/reactor/tests/test_reactors.py b/armi/reactor/tests/test_reactors.py index 5051d96c3..dbb2301ee 100644 --- a/armi/reactor/tests/test_reactors.py +++ b/armi/reactor/tests/test_reactors.py @@ -539,7 +539,7 @@ def test_getAssembly(self): def test_restoreReactor(self): aListLength = len(self.r.core.getAssemblies()) converter = self.r.core.growToFullCore(self.o.cs) - converter.restorePreviousGeometry(self.o.cs, self.r) + converter.restorePreviousGeometry(self.r) self.assertEqual(aListLength, len(self.r.core.getAssemblies())) def test_differentNuclideModels(self): diff --git a/armi/scripts/migration/m0_1_0_newDbFormat.py b/armi/scripts/migration/m0_1_0_newDbFormat.py index 6f852d5d6..3197c0b07 100644 --- a/armi/scripts/migration/m0_1_0_newDbFormat.py +++ b/armi/scripts/migration/m0_1_0_newDbFormat.py @@ -41,10 +41,10 @@ def __init__(self, stream=None, path=None): raise ValueError("Can only migrate database by path.") def apply(self): - _migrateDatabase(self.path, _preCollector, _visit, _postApplier) + _migrateDatabase(self.path, _preCollector, _visit) -def _migrateDatabase(databasePath, preCollector, visitor, postApplier): +def _migrateDatabase(databasePath, preCollector, visitor): """ Generic database-traversing system to apply custom version-specific migrations. @@ -57,9 +57,6 @@ def _migrateDatabase(databasePath, preCollector, visitor, postApplier): visitor : callable Function that will be called on each dataset of the old HDF5 database. This should map information into the new DB. - postApplier : callable - Function that will run after all visiting is done. Will have acecss - to the pre-collected data. Raises ------ @@ -95,8 +92,6 @@ def closure(name, dataset): newDB.attrs["original-databaseVersion"] = oldDB.attrs["databaseVersion"] newDB.attrs["version"] = version - postApplier(oldDB, newDB, preCollection) - runLog.info("Successfully generated migrated database file: {}".format(newDBName)) @@ -132,10 +127,6 @@ def _preCollector(oldDB): return preCollection -def _postApplier(oldDB, newDB, preCollection): - pass - - def _updateLayout(newDB, preCollection, name, dataset): path = name.split("/") if len(path) == 4 and path[2] == "grids" and path[3] != "type": diff --git a/armi/utils/__init__.py b/armi/utils/__init__.py index 077822478..400da278f 100644 --- a/armi/utils/__init__.py +++ b/armi/utils/__init__.py @@ -426,7 +426,7 @@ def getPreviousTimeNode(cycle, node, cs): return (cycle - 1, indexOfLastNode) -def tryPickleOnAllContents(obj, ignore=None, path=None, verbose=False): +def tryPickleOnAllContents(obj, ignore=None, verbose=False): r""" Attempts to pickle all members of this object and identifies those who cannot be pickled. @@ -440,11 +440,8 @@ def tryPickleOnAllContents(obj, ignore=None, path=None, verbose=False): Any object to be tested. ignore : iterable list of string variable names to ignore. - path : str - the path in which to test pickle. verbose : bool, optional Print all objects whether they fail or not - """ if ignore is None: ignore = [] @@ -462,7 +459,7 @@ def tryPickleOnAllContents(obj, ignore=None, path=None, verbose=False): ) -def doTestPickleOnAllContents2(obj, ignore=None, path=None, verbose=False): +def doTestPickleOnAllContents2(obj, ignore=None): r""" Attempts to find one unpickleable object in a nested object @@ -510,7 +507,7 @@ def save(self, obj): raise -def tryPickleOnAllContents3(obj, ignore=None, path=None, verbose=False): +def tryPickleOnAllContents3(obj): """ Definitely find pickle errors diff --git a/armi/utils/pathTools.py b/armi/utils/pathTools.py index 095e9aec8..2f6752ff5 100644 --- a/armi/utils/pathTools.py +++ b/armi/utils/pathTools.py @@ -116,25 +116,10 @@ def isAccessible(path): return False -def getModAndClassFromPath(path): - """ - Return the path to the module specified and the name of the class in the module. - - Raises - ------ - ValueError: - If the path does not exist or - - - """ - pass - - def separateModuleAndAttribute(pathAttr): """ Return True of the specified python module, and attribute of the module exist. - Parameters ---------- pathAttr : str