Skip to content

Commit 11d78e0

Browse files
authored
chore: remove unused code (#1437)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-api-python-client/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes #1436 🦕
1 parent addafd0 commit 11d78e0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

googleapiclient/discovery.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
"""
1919
from __future__ import absolute_import
2020
import six
21-
from six.moves import zip
2221

2322
__author__ = "[email protected] (Joe Gregorio)"
2423
__all__ = ["build", "build_from_document", "fix_method_name", "key2param"]
2524

26-
from six import BytesIO
2725
from six.moves import http_client
28-
from six.moves.urllib.parse import urlencode, urlparse, urljoin, urlunparse, parse_qsl
26+
from six.moves.urllib.parse import urljoin
27+
2928

3029
# Standard library imports
3130
import copy
@@ -1145,7 +1144,7 @@ def method(self, **kwargs):
11451144
msgRoot.attach(msg)
11461145
# encode the body: note that we can't use `as_string`, because
11471146
# it plays games with `From ` lines.
1148-
fp = BytesIO()
1147+
fp = six.BytesIO()
11491148
g = _BytesGenerator(fp, mangle_from_=False)
11501149
g.flatten(msgRoot, unixfrom=False)
11511150
body = fp.getvalue()
@@ -1219,7 +1218,7 @@ def method(self, **kwargs):
12191218
enumDesc = paramdesc.get("enumDescriptions", [])
12201219
if enum and enumDesc:
12211220
docs.append(" Allowed values\n")
1222-
for (name, desc) in zip(enum, enumDesc):
1221+
for (name, desc) in six.moves.zip(enum, enumDesc):
12231222
docs.append(" %s - %s\n" % (name, desc))
12241223
if "response" in methodDesc:
12251224
if methodName.endswith("_media"):

noxfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import sys
1818

1919
import nox
20-
import os
2120
import shutil
2221

2322
test_dependencies = [

0 commit comments

Comments
 (0)