Remove unused imports
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
"""OpenSSL Crypto-related routines for oauth2client."""
|
"""OpenSSL Crypto-related routines for oauth2client."""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import six
|
|
||||||
from OpenSSL import crypto
|
from OpenSSL import crypto
|
||||||
|
|
||||||
from oauth2client._helpers import _parse_pem_key
|
from oauth2client._helpers import _parse_pem_key
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ from Crypto.PublicKey import RSA
|
|||||||
from Crypto.Hash import SHA256
|
from Crypto.Hash import SHA256
|
||||||
from Crypto.Signature import PKCS1_v1_5
|
from Crypto.Signature import PKCS1_v1_5
|
||||||
from Crypto.Util.asn1 import DerSequence
|
from Crypto.Util.asn1 import DerSequence
|
||||||
import six
|
|
||||||
|
|
||||||
from oauth2client._helpers import _parse_pem_key
|
from oauth2client._helpers import _parse_pem_key
|
||||||
from oauth2client._helpers import _to_bytes
|
from oauth2client._helpers import _to_bytes
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ from google.appengine.api import memcache
|
|||||||
from google.appengine.api import users
|
from google.appengine.api import users
|
||||||
from google.appengine.ext import db
|
from google.appengine.ext import db
|
||||||
from google.appengine.ext.webapp.util import login_required
|
from google.appengine.ext.webapp.util import login_required
|
||||||
from google.appengine.ext.webapp.util import run_wsgi_app
|
|
||||||
from oauth2client import GOOGLE_AUTH_URI
|
from oauth2client import GOOGLE_AUTH_URI
|
||||||
from oauth2client import GOOGLE_REVOKE_URI
|
from oauth2client import GOOGLE_REVOKE_URI
|
||||||
from oauth2client import GOOGLE_TOKEN_URI
|
from oauth2client import GOOGLE_TOKEN_URI
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ from oauth2client import GOOGLE_TOKEN_INFO_URI
|
|||||||
from oauth2client._helpers import _from_bytes
|
from oauth2client._helpers import _from_bytes
|
||||||
from oauth2client._helpers import _to_bytes
|
from oauth2client._helpers import _to_bytes
|
||||||
from oauth2client._helpers import _urlsafe_b64decode
|
from oauth2client._helpers import _urlsafe_b64decode
|
||||||
from oauth2client._helpers import _urlsafe_b64encode
|
|
||||||
from oauth2client import clientsecrets
|
from oauth2client import clientsecrets
|
||||||
from oauth2client import util
|
from oauth2client import util
|
||||||
|
|
||||||
@@ -1106,7 +1105,10 @@ def _in_gae_environment():
|
|||||||
return SETTINGS.env_name in ('GAE_PRODUCTION', 'GAE_LOCAL')
|
return SETTINGS.env_name in ('GAE_PRODUCTION', 'GAE_LOCAL')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import google.appengine
|
import google.appengine # noqa: unused import
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
server_software = os.environ.get(_SERVER_SOFTWARE, '')
|
server_software = os.environ.get(_SERVER_SOFTWARE, '')
|
||||||
if server_software.startswith('Google App Engine/'):
|
if server_software.startswith('Google App Engine/'):
|
||||||
SETTINGS.env_name = 'GAE_PRODUCTION'
|
SETTINGS.env_name = 'GAE_PRODUCTION'
|
||||||
@@ -1114,8 +1116,6 @@ def _in_gae_environment():
|
|||||||
elif server_software.startswith('Development/'):
|
elif server_software.startswith('Development/'):
|
||||||
SETTINGS.env_name = 'GAE_LOCAL'
|
SETTINGS.env_name = 'GAE_LOCAL'
|
||||||
return True
|
return True
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import sys
|
|
||||||
import types
|
|
||||||
|
|
||||||
import six
|
import six
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
import base64
|
import base64
|
||||||
import binascii
|
import binascii
|
||||||
import hmac
|
import hmac
|
||||||
import six
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from oauth2client._helpers import _to_bytes
|
from oauth2client._helpers import _to_bytes
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import json
|
|||||||
import os
|
import os
|
||||||
import StringIO
|
import StringIO
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
|
||||||
import urllib2
|
import urllib2
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
"""Copy of googleapiclient.http's mock functionality."""
|
"""Copy of googleapiclient.http's mock functionality."""
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
import httplib2
|
import httplib2
|
||||||
|
|
||||||
# TODO(craigcitro): Find a cleaner way to share this code with googleapiclient.
|
# TODO(craigcitro): Find a cleaner way to share this code with googleapiclient.
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ from google.appengine.api.memcache import memcache_stub
|
|||||||
from google.appengine.ext import db
|
from google.appengine.ext import db
|
||||||
from google.appengine.ext import ndb
|
from google.appengine.ext import ndb
|
||||||
from google.appengine.ext import testbed
|
from google.appengine.ext import testbed
|
||||||
from google.appengine.runtime import apiproxy_errors
|
|
||||||
from oauth2client import appengine
|
from oauth2client import appengine
|
||||||
from oauth2client import GOOGLE_TOKEN_URI
|
from oauth2client import GOOGLE_TOKEN_URI
|
||||||
from oauth2client.clientsecrets import _loadfile
|
from oauth2client.clientsecrets import _loadfile
|
||||||
@@ -60,7 +59,6 @@ from oauth2client.appengine import StorageByKeyName
|
|||||||
from oauth2client.client import _CLOUDSDK_CONFIG_ENV_VAR
|
from oauth2client.client import _CLOUDSDK_CONFIG_ENV_VAR
|
||||||
from oauth2client.client import AccessTokenRefreshError
|
from oauth2client.client import AccessTokenRefreshError
|
||||||
from oauth2client.client import Credentials
|
from oauth2client.client import Credentials
|
||||||
from oauth2client.client import FlowExchangeError
|
|
||||||
from oauth2client.client import OAuth2Credentials
|
from oauth2client.client import OAuth2Credentials
|
||||||
from oauth2client.client import flow_from_clientsecrets
|
from oauth2client.client import flow_from_clientsecrets
|
||||||
from oauth2client.client import save_to_well_known_file
|
from oauth2client.client import save_to_well_known_file
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import os
|
|||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import httplib2
|
|
||||||
|
|
||||||
from oauth2client._helpers import _from_bytes
|
from oauth2client._helpers import _from_bytes
|
||||||
from oauth2client import GOOGLE_AUTH_URI
|
from oauth2client import GOOGLE_AUTH_URI
|
||||||
from oauth2client import GOOGLE_REVOKE_URI
|
from oauth2client import GOOGLE_REVOKE_URI
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ django_settings.SECRET_KEY = 'xyzzy'
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from oauth2client._helpers import _from_bytes
|
from oauth2client._helpers import _from_bytes
|
||||||
from oauth2client._helpers import _to_bytes
|
|
||||||
from oauth2client.client import Credentials
|
from oauth2client.client import Credentials
|
||||||
from oauth2client.client import Flow
|
from oauth2client.client import Flow
|
||||||
from oauth2client.client import OAuth2Credentials
|
from oauth2client.client import OAuth2Credentials
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import json
|
|||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import httplib2
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from oauth2client._helpers import _to_bytes
|
from oauth2client._helpers import _to_bytes
|
||||||
|
|||||||
@@ -20,14 +20,11 @@ Unit tests for oauth2client.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import mock
|
|
||||||
import sys
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .http_mock import HttpMockSequence
|
from .http_mock import HttpMockSequence
|
||||||
from oauth2client import client
|
|
||||||
from oauth2client.client import Credentials
|
from oauth2client.client import Credentials
|
||||||
from oauth2client.client import SignedJwtAssertionCredentials
|
from oauth2client.client import SignedJwtAssertionCredentials
|
||||||
from oauth2client.client import VerifyJwtTokenError
|
from oauth2client.client import VerifyJwtTokenError
|
||||||
|
|||||||
Reference in New Issue
Block a user