From d24ea74e9bee7075afc9ea9ff880cca2df256fbc Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Sun, 3 Jul 2022 12:45:28 -0700 Subject: [PATCH 1/3] Slides sample: remove extra quote There's an extra quote in the docstring, causing the code snippet to not be rendered with correct syntax highlighting. If you go to this page, the snippet look like it's all commented out. https://developers.google.com/slides/api/guides/create-slide#python --- slides/snippets/slides_create_slide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides/snippets/slides_create_slide.py b/slides/snippets/slides_create_slide.py index 941cd9f5..8f16e1d2 100644 --- a/slides/snippets/slides_create_slide.py +++ b/slides/snippets/slides_create_slide.py @@ -27,7 +27,7 @@ def create_slide(presentation_id, page_id): Creates the Presentation the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application.\n """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member From d963d51b99e771d6695f92693838ec492a1603e6 Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Sun, 3 Jul 2022 13:25:05 -0700 Subject: [PATCH 2/3] Remove extra '\n"' from docstrings. --- slides/snippets/slides_copy_presentation.py | 2 +- slides/snippets/slides_create_bulleted_text.py | 2 +- slides/snippets/slides_create_image.py | 2 +- slides/snippets/slides_create_presentation.py | 2 +- slides/snippets/slides_create_sheets_chart.py | 2 +- slides/snippets/slides_create_textbox_with_text.py | 2 +- slides/snippets/slides_refresh_sheets_chart.py | 2 +- slides/snippets/slides_simple_text_replace.py | 2 +- slides/snippets/slides_text_merging.py | 2 +- slides/snippets/slides_text_style_update.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/slides/snippets/slides_copy_presentation.py b/slides/snippets/slides_copy_presentation.py index 6aa7512b..5b4ad584 100644 --- a/slides/snippets/slides_copy_presentation.py +++ b/slides/snippets/slides_copy_presentation.py @@ -27,7 +27,7 @@ def copy_presentation(presentation_id, copy_title): Creates the copy Presentation the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() diff --git a/slides/snippets/slides_create_bulleted_text.py b/slides/snippets/slides_create_bulleted_text.py index ff2ba8ed..89c88c5c 100644 --- a/slides/snippets/slides_create_bulleted_text.py +++ b/slides/snippets/slides_create_bulleted_text.py @@ -27,7 +27,7 @@ def create_bulleted_text(presentation_id, shape_id): Run create_bulleted_text the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_create_image.py b/slides/snippets/slides_create_image.py index eade9545..a4b34e75 100644 --- a/slides/snippets/slides_create_image.py +++ b/slides/snippets/slides_create_image.py @@ -27,7 +27,7 @@ def create_image(presentation_id, page_id): Creates images the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() diff --git a/slides/snippets/slides_create_presentation.py b/slides/snippets/slides_create_presentation.py index b6f9c91b..33777e29 100644 --- a/slides/snippets/slides_create_presentation.py +++ b/slides/snippets/slides_create_presentation.py @@ -27,7 +27,7 @@ def create_presentation(title): Creates the Presentation the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_create_sheets_chart.py b/slides/snippets/slides_create_sheets_chart.py index f1316334..18d57292 100644 --- a/slides/snippets/slides_create_sheets_chart.py +++ b/slides/snippets/slides_create_sheets_chart.py @@ -28,7 +28,7 @@ def create_sheets_chart(presentation_id, page_id, spreadsheet_id, create_sheets_chart the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_create_textbox_with_text.py b/slides/snippets/slides_create_textbox_with_text.py index 57db69d9..2f1e1889 100644 --- a/slides/snippets/slides_create_textbox_with_text.py +++ b/slides/snippets/slides_create_textbox_with_text.py @@ -27,7 +27,7 @@ def create_textbox_with_text(presentation_id, page_id): Creates the textbox with text, the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_refresh_sheets_chart.py b/slides/snippets/slides_refresh_sheets_chart.py index 3fb83406..4a962eae 100644 --- a/slides/snippets/slides_refresh_sheets_chart.py +++ b/slides/snippets/slides_refresh_sheets_chart.py @@ -27,7 +27,7 @@ def refresh_sheets_chart(presentation_id, presentation_chart_id): refresh_sheets_chart the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_simple_text_replace.py b/slides/snippets/slides_simple_text_replace.py index bce6dfdd..af6047e9 100644 --- a/slides/snippets/slides_simple_text_replace.py +++ b/slides/snippets/slides_simple_text_replace.py @@ -27,7 +27,7 @@ def simple_text_replace(presentation_id, shape_id, replacement_text): Run simple_text_replace the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_text_merging.py b/slides/snippets/slides_text_merging.py index f0c338fe..310adc3e 100644 --- a/slides/snippets/slides_text_merging.py +++ b/slides/snippets/slides_text_merging.py @@ -27,7 +27,7 @@ def text_merging(template_presentation_id, data_spreadsheet_id): Run Text merging the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member diff --git a/slides/snippets/slides_text_style_update.py b/slides/snippets/slides_text_style_update.py index c82c900a..96b3d40b 100644 --- a/slides/snippets/slides_text_style_update.py +++ b/slides/snippets/slides_text_style_update.py @@ -27,7 +27,7 @@ def text_style_update(presentation_id, shape_id): create_sheets_chart the user has access to. Load pre-authorized user credentials from the environment. TODO(developer) - See https://developers.google.com/identity - for guides on implementing OAuth2 for the application.\n" + for guides on implementing OAuth2 for the application. """ creds, _ = google.auth.default() # pylint: disable=maybe-no-member From 4dc802f2fb9343567369d8b23ffc73dae209078f Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Sun, 3 Jul 2022 13:36:53 -0700 Subject: [PATCH 3/3] Fix mismatched region tags --- slides/snippets/slides_create_sheets_chart.py | 2 ++ slides/snippets/slides_simple_text_replace.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/slides/snippets/slides_create_sheets_chart.py b/slides/snippets/slides_create_sheets_chart.py index 18d57292..a1f286af 100644 --- a/slides/snippets/slides_create_sheets_chart.py +++ b/slides/snippets/slides_create_sheets_chart.py @@ -90,3 +90,5 @@ def create_sheets_chart(presentation_id, page_id, spreadsheet_id, "FIRSTSLIDE", "17eqFZl_WK4WVixX8PjvjfLD77DraoFwMDXeiHB3dvuM", "1107320627") + +# [END slides_create_sheets_chart] diff --git a/slides/snippets/slides_simple_text_replace.py b/slides/snippets/slides_simple_text_replace.py index af6047e9..23acde4c 100644 --- a/slides/snippets/slides_simple_text_replace.py +++ b/slides/snippets/slides_simple_text_replace.py @@ -70,3 +70,5 @@ def simple_text_replace(presentation_id, shape_id, replacement_text): simple_text_replace('10QnVUx1X2qHsL17WUidGpPh_SQhXYx40CgIxaKk8jU4', 'MyTextBox_6', 'GWSpace_now') + +# [END slides_simple_text_replace]