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 🦕
diff --git a/googleapiclient/discovery.py b/googleapiclient/discovery.py
index 48f51fe..3273899 100644
--- a/googleapiclient/discovery.py
+++ b/googleapiclient/discovery.py
@@ -18,14 +18,13 @@
"""
from __future__ import absolute_import
import six
-from six.moves import zip
__author__ = "jcgregorio@google.com (Joe Gregorio)"
__all__ = ["build", "build_from_document", "fix_method_name", "key2param"]
-from six import BytesIO
from six.moves import http_client
-from six.moves.urllib.parse import urlencode, urlparse, urljoin, urlunparse, parse_qsl
+from six.moves.urllib.parse import urljoin
+
# Standard library imports
import copy
@@ -1145,7 +1144,7 @@
msgRoot.attach(msg)
# encode the body: note that we can't use `as_string`, because
# it plays games with `From ` lines.
- fp = BytesIO()
+ fp = six.BytesIO()
g = _BytesGenerator(fp, mangle_from_=False)
g.flatten(msgRoot, unixfrom=False)
body = fp.getvalue()
@@ -1219,7 +1218,7 @@
enumDesc = paramdesc.get("enumDescriptions", [])
if enum and enumDesc:
docs.append(" Allowed values\n")
- for (name, desc) in zip(enum, enumDesc):
+ for (name, desc) in six.moves.zip(enum, enumDesc):
docs.append(" %s - %s\n" % (name, desc))
if "response" in methodDesc:
if methodName.endswith("_media"):
diff --git a/noxfile.py b/noxfile.py
index a65d8fa..d33f26e 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -17,7 +17,6 @@
import sys
import nox
-import os
import shutil
test_dependencies = [