From 2f8899ff9a0738f003f2b70980dfe2e22e89e9a5 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 25 Jan 2022 13:38:52 -0800 Subject: [PATCH] Add scope to client docs (#408) Adds the "scope" attribute to the exported clients, so that they appear in the docstrings of routes that have a scope defined. After running: ``` python generate_base_client.py tox -e docs ``` I checked the html build files and scopes are showing up as expected. --- generate_base_client.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/generate_base_client.py b/generate_base_client.py index 63c67958..dfdff9d5 100755 --- a/generate_base_client.py +++ b/generate_base_client.py @@ -57,15 +57,29 @@ def main(): o = subprocess.check_output( (['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] + - specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] + - ['--', '-w', 'user,app,noauth', '-m', 'base', '-c', 'DropboxBase', '-t', 'dropbox'])) + specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] + + [ + '--', + '-w', 'user,app,noauth', + '-m', 'base', + '-c', 'DropboxBase', + '-t', 'dropbox', + '-a', 'scope' + ])) if o: print('Output:', o) o = subprocess.check_output( (['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] + - specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] + - ['--', '-w', 'team', '-m', 'base_team', '-c', 'DropboxTeamBase', '-t', 'dropbox'])) + specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] + + [ + '--', + '-w', 'team', + '-m', 'base_team', + '-c', 'DropboxTeamBase', + '-t', 'dropbox', + '-a', 'scope' + ])) if o: print('Output:', o)