From eae9a16591baefd21103eba5889e2b023db5896d Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Fri, 15 Apr 2022 18:10:36 -0400 Subject: [PATCH] Merge branch '18995-code-cleanup-2' refs #18995 Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- doc/gen_api_method_docs.py | 2 +- sdk/cwl/arvados_cwl/arvcontainer.py | 2 +- sdk/python/arvados/commands/get.py | 2 +- .../fuse/tests/performance/test_collection_performance.py | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/gen_api_method_docs.py b/doc/gen_api_method_docs.py index d2a743bb78..9a29d46167 100755 --- a/doc/gen_api_method_docs.py +++ b/doc/gen_api_method_docs.py @@ -59,7 +59,7 @@ for resource in sorted(api[u'resources']): try: os.rename(out_fname, backup_name) except OSError as e: - print "WARNING: could not back up {1} as {2}: {3}".format( + print "WARNING: could not back up {0} as {1}: {2}".format( out_fname, backup_name, e) outf = open(out_fname, 'w') outf.write( diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index 8c468dd22d..e2c2f2e67b 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -63,7 +63,7 @@ class ArvadosContainer(JobBase): env["TMPDIR"] = self.tmpdir return env - def run(self, runtimeContext): + def run(self, toplevelRuntimeContext): # ArvadosCommandTool subclasses from cwltool.CommandLineTool, # which calls makeJobRunner() to get a new ArvadosContainer # object. The fields that define execution such as diff --git a/sdk/python/arvados/commands/get.py b/sdk/python/arvados/commands/get.py index c061c70f0e..c4262c59c9 100755 --- a/sdk/python/arvados/commands/get.py +++ b/sdk/python/arvados/commands/get.py @@ -290,7 +290,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr): if todo_bytes==0 else 100.0*out_bytes/todo_bytes))) elif args.batch_progress: - stderr.write('%s %d read %d total\n' % + stderr.write('%s %d read %d total %d\n' % (sys.argv[0], os.getpid(), out_bytes, todo_bytes)) if digestor: diff --git a/services/fuse/tests/performance/test_collection_performance.py b/services/fuse/tests/performance/test_collection_performance.py index 475e0e75e4..98bc98abd4 100644 --- a/services/fuse/tests/performance/test_collection_performance.py +++ b/services/fuse/tests/performance/test_collection_performance.py @@ -472,10 +472,9 @@ class FuseListLargeProjectContents(MountTestBase): project_contents = llfuse.listdir(self.mounttmp) self.assertEqual(201, len(project_contents)) self.assertIn('Collection_1', project_contents) - return project_contents @profiled - def listContentsInProjectWithManyCollections(self, project_contents): + def listContentsInProjectWithManyCollections(self): project_contents = llfuse.listdir(self.mounttmp) self.assertEqual(201, len(project_contents)) self.assertIn('Collection_1', project_contents) @@ -488,5 +487,5 @@ class FuseListLargeProjectContents(MountTestBase): def test_listLargeProjectContents(self): self.make_mount(fuse.ProjectDirectory, project_object=run_test_server.fixture('groups')['project_with_201_collections']) - project_contents = self.getProjectWithManyCollections() - self.listContentsInProjectWithManyCollections(project_contents) + self.getProjectWithManyCollections() + self.listContentsInProjectWithManyCollections() -- 2.30.2