Skip to content

Commit d472d95

Browse files
authored
Merge branch 'main' into fix-flake8-F841
2 parents 5007c6d + 1d744d4 commit d472d95

File tree

18 files changed

+16
-43
lines changed

18 files changed

+16
-43
lines changed

apiclient/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Retain apiclient as an alias for googleapiclient."""
22

3-
import googleapiclient
43
from googleapiclient import channel, discovery, errors, http, mimeparse, model
54

65
try:

describe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
import uritemplate
3636

37-
from googleapiclient.discovery import DISCOVERY_URI, build, build_from_document
37+
from googleapiclient.discovery import DISCOVERY_URI, build_from_document
3838
from googleapiclient.http import build_http
3939

4040
DISCOVERY_DOC_DIR = (

expandsymlinks.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,36 @@
1818
"""Copy files from source to dest expanding symlinks along the way.
1919
"""
2020

21-
from shutil import copytree
22-
2321
import argparse
22+
from shutil import copytree
2423
import sys
2524

26-
2725
# Ignore these files and directories when copying over files into the snapshot.
28-
IGNORE = set(['.hg', 'httplib2', 'oauth2', 'simplejson', 'static'])
26+
IGNORE = set([".hg", "httplib2", "oauth2", "simplejson", "static"])
2927

3028
# In addition to the above files also ignore these files and directories when
3129
# copying over samples into the snapshot.
32-
IGNORE_IN_SAMPLES = set(['googleapiclient', 'oauth2client', 'uritemplate'])
30+
IGNORE_IN_SAMPLES = set(["googleapiclient", "oauth2client", "uritemplate"])
3331

3432
parser = argparse.ArgumentParser(description=__doc__)
3533

36-
parser.add_argument('--source', default='.',
37-
help='Directory name to copy from.')
34+
parser.add_argument("--source", default=".", help="Directory name to copy from.")
3835

39-
parser.add_argument('--dest', default='snapshot',
40-
help='Directory name to copy to.')
36+
parser.add_argument("--dest", default="snapshot", help="Directory name to copy to.")
4137

4238

4339
def _ignore(path, names):
44-
retval = set()
45-
if path != '.':
46-
retval = retval.union(IGNORE_IN_SAMPLES.intersection(names))
47-
retval = retval.union(IGNORE.intersection(names))
48-
return retval
40+
retval = set()
41+
if path != ".":
42+
retval = retval.union(IGNORE_IN_SAMPLES.intersection(names))
43+
retval = retval.union(IGNORE.intersection(names))
44+
return retval
4945

5046

5147
def main():
52-
copytree(FLAGS.source, FLAGS.dest, symlinks=True,
53-
ignore=_ignore)
48+
copytree(FLAGS.source, FLAGS.dest, symlinks=True, ignore=_ignore)
5449

5550

56-
if __name__ == '__main__':
57-
FLAGS = parser.parse_args(sys.argv[1:])
58-
main()
51+
if __name__ == "__main__":
52+
FLAGS = parser.parse_args(sys.argv[1:])
53+
main()

googleapiclient/discovery_cache/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
from __future__ import absolute_import
1818

19-
import datetime
2019
import logging
2120
import os
2221

@@ -37,8 +36,6 @@ def autodetect():
3736
"""
3837
if "APPENGINE_RUNTIME" in os.environ:
3938
try:
40-
from google.appengine.api import memcache
41-
4239
from . import appengine_memcache
4340

4441
return appengine_memcache.cache

googleapiclient/discovery_cache/file_cache.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import logging
2828
import os
2929
import tempfile
30-
import threading
3130

3231
try:
3332
from oauth2client.contrib.locked_file import LockedFile

noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"scripts",
2626
"tests",
2727
"describe.py",
28+
"expandsymlinks.py",
2829
"noxfile.py",
2930
"owlbot.py",
3031
"setup.py",

samples/adexchangeseller/get_all_alerts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
__author__ = '[email protected] (Sérgio Gomes)'
2424

25-
import argparse
2625
import sys
2726

2827
from googleapiclient import sample_tools

samples/adexchangeseller/get_all_dimensions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
__author__ = '[email protected] (Sérgio Gomes)'
2424

25-
import argparse
2625
import sys
2726

2827
from googleapiclient import sample_tools

samples/adexchangeseller/get_all_metrics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
__author__ = '[email protected] (Sérgio Gomes)'
2424

25-
import argparse
2625
import sys
2726

2827
from googleapiclient import sample_tools

samples/adexchangeseller/get_all_preferred_deals.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
__author__ = '[email protected] (Sérgio Gomes)'
2424

25-
import argparse
2625
import sys
2726

2827
from googleapiclient import sample_tools

0 commit comments

Comments
 (0)