Skip to content

Commit 3ba9a6c

Browse files
committed
Delint recent changes
1 parent de27b67 commit 3ba9a6c

7 files changed

Lines changed: 11 additions & 27 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
pull_request:
77
branches: [ master ]
88
workflow_dispatch:
9-
branches: [ master ]
109

1110
jobs:
1211
test:

.github/workflows/lint.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ on:
2020
branches:
2121
- master
2222
workflow_dispatch:
23-
branches: [ master ]
2423

2524
jobs:
2625
lint:

docs/mail-merge/docs_mail_merge_test.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,18 @@
2525
import unittest
2626

2727
import google.auth
28-
from docs_mail_merge import _copy_template, get_data, get_http_client
28+
from docs_mail_merge import _copy_template, get_data
2929
from googleapiclient import discovery
3030

31+
creds, _ = google.auth.default()
32+
3133

3234
class TestDocsMailMerge(unittest.TestCase):
3335
'Unit tests for Mail Merge sample'
3436

3537
def test_project(self):
3638
self.assertTrue(project_test())
3739

38-
def test_gapis(self):
39-
self.assertTrue(gapis_test())
40-
4140
def test_create_doc(self):
4241
self.assertTrue(create_doc_test())
4342

@@ -56,18 +55,9 @@ def project_test():
5655
credentials, project = google.auth.default()
5756

5857

59-
def gapis_test():
60-
'Tests whether project can connect to all 3 APIs used in the sample.'
61-
HTTP = get_http_client()
62-
discovery.build('drive', 'v3', http=HTTP)
63-
discovery.build('docs', 'v1', http=HTTP)
64-
discovery.build('sheets', 'v4', http=HTTP)
65-
return True
66-
67-
6858
def create_doc_test():
6959
'Tests whether project can create and delete a Google Docs file.'
70-
DRIVE = discovery.build('drive', 'v3', http=get_http_client())
60+
DRIVE = discovery.build('drive', 'v3', credentials=creds)
7161
DATA = {
7262
'name': 'Test Doc',
7363
'mimeType': 'application/vnd.google-apps.document',
@@ -79,7 +69,7 @@ def create_doc_test():
7969

8070
def copy_doc_test():
8171
'Tests whether project can copy and delete a Google Docs file.'
82-
DRIVE = discovery.build('drive', 'v3', http=get_http_client())
72+
DRIVE = discovery.build('drive', 'v3', credentials=creds)
8373
DOCS_FILE_ID = '1Xycxuuv7OhEQUuzbt_Mw0TPMq02MseSD1vZdBJ3nLjk'
8474
doc_id = _copy_template(DOCS_FILE_ID, 'text', DRIVE)
8575
DRIVE.files().delete(fileId=doc_id, fields='').execute()

forms/quickstart/quickstart.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright 2021 Google LLC
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# https://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -63,7 +63,7 @@
6363
"location": {
6464
"index": 0
6565
}
66-
}
66+
}
6767
}]
6868
}
6969

@@ -77,4 +77,4 @@
7777
get_result = form_service.forms().get(formId=result["formId"]).execute()
7878
print(get_result)
7979

80-
# [END forms_quickstart]
80+
# [END forms_quickstart]

slides/snippets/slides_create_bulleted_text.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def create_bulleted_text(presentation_id, shape_id):
6565
if __name__ == '__main__':
6666
# Put the presentation_id and shape_id
6767
# to be submitted.
68-
create_bulleted_text("1VD1xmi1-9DonI4zmCKENTzlVxIL5SdGGTmbHmnBjQ1E"
69-
, "MyTextBox_9")
68+
create_bulleted_text("1VD1xmi1-9DonI4zmCKENTzlVxIL5SdGGTmbHmnBjQ1E", "MyTextBox_9")
7069

7170
# [END slides_create_bulleted_text]

slides/snippets/slides_image_merging.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ def image_merging(template_presentation_id,
4040

4141
customer_graphic_url = image_url
4242

43-
44-
# [START slides_image_merging]
4543
# Duplicate the template presentation using the Drive API.
4644
copy_title = customer_name + ' presentation'
4745
drive_response = drive_service.files().copy(

slides/snippets/slides_text_merging.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def text_merging(template_presentation_id, data_spreadsheet_id):
114114

115115
return response
116116

117-
118117
except HttpError as error:
119118
print(f"An error occurred: {error}")
120119
return error

0 commit comments

Comments
 (0)