From: Brett Smith Date: Sat, 18 Nov 2023 17:22:54 +0000 (-0500) Subject: 21132: Note ArvadosAPIClient is a Resource X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/4571ee1ebc16366997b28561e85e07717da62be9 21132: Note ArvadosAPIClient is a Resource The real impact of this change is marginal, but it establishes a pattern for documenting request objects, which will be more substantial. Arvados-DCO-1.1-Signed-off-by: Brett Smith --- diff --git a/sdk/python/discovery2pydoc.py b/sdk/python/discovery2pydoc.py index d2f206c80f..e37784e06d 100755 --- a/sdk/python/discovery2pydoc.py +++ b/sdk/python/discovery2pydoc.py @@ -95,6 +95,7 @@ to list the specific keys you need. Refer to the API documentation for details. ''' _MODULE_PRELUDE = ''' +import googleapiclient.discovery import sys from typing import Any, Dict, List if sys.version_info < (3, 8): @@ -354,7 +355,7 @@ def main(arglist: Optional[Sequence[str]]=None) -> int: for name, resource_spec in resources: print(document_resource(name, resource_spec), file=args.out_file) - print('''class ArvadosAPIClient:''', file=args.out_file) + print('''class ArvadosAPIClient(googleapiclient.discovery.Resource):''', file=args.out_file) for name, _ in resources: class_name = classify_name(name) docstring = f"Return an instance of `{class_name}` to call methods via this client"