From 1372710a7f3b33d822c52455ed613c1063ad4b16 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Mon, 11 Dec 2023 09:29:56 -0500 Subject: [PATCH] 21283: Make arvados.api.__call__ a staticmethod This gives it a more helpful signature and docstring with less code. Arvados-DCO-1.1-Signed-off-by: Brett Smith --- sdk/python/arvados/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py index 6303b84f70..83f658201c 100644 --- a/sdk/python/arvados/__init__.py +++ b/sdk/python/arvados/__init__.py @@ -42,8 +42,7 @@ from .retry import RetryLoop # module and you can import it normally, but we make that module callable so # all the existing code that says `arvados.api('v1', ...)` still works. class _CallableAPIModule(api.__class__): - def __call__(self, *args, **kwargs): - return self.api(*args, **kwargs) + __call__ = staticmethod(api.api) api.__class__ = _CallableAPIModule # Override logging module pulled in via `from ... import *` -- 2.30.2