Moving __author__ after imports in oauth2client/.

This is to address PEP8 E402 as in previous commit.
This commit is contained in:
Danny Hermes
2015-08-20 14:19:29 -07:00
parent bbbcfecda3
commit b70baa4fab
15 changed files with 52 additions and 37 deletions

View File

@@ -17,8 +17,6 @@
Utilities for making it easier to use OAuth 2.0 on Google App Engine.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import cgi
import json
import logging
@@ -55,6 +53,9 @@ try:
except ImportError:
ndb = None
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
logger = logging.getLogger(__name__)
OAUTH2CLIENT_NAMESPACE = 'oauth2client#ns'

View File

@@ -17,8 +17,6 @@
Tools for interacting with OAuth 2.0 protected resources.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import base64
import collections
import copy
@@ -46,6 +44,9 @@ from oauth2client._helpers import _urlsafe_b64decode
from oauth2client import clientsecrets
from oauth2client import util
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
HAS_OPENSSL = False
HAS_CRYPTO = False
try:
@@ -56,6 +57,7 @@ try:
except ImportError:
pass
logger = logging.getLogger(__name__)
# Expiry is stored in RFC3339 UTC format

View File

@@ -18,11 +18,12 @@ A client_secrets.json file contains all the information needed to interact with
an OAuth 2.0 protected service.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import json
import six
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
# Properties that make a client_secrets.json file valid.
TYPE_WEB = 'web'
TYPE_INSTALLED = 'installed'

View File

@@ -25,6 +25,7 @@ from oauth2client._helpers import _to_bytes
from oauth2client._helpers import _urlsafe_b64decode
from oauth2client._helpers import _urlsafe_b64encode
CLOCK_SKEW_SECS = 300 # 5 minutes in seconds
AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds
MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds

View File

@@ -18,8 +18,6 @@ Utilities for using OAuth 2.0 in conjunction with
the Django datastore.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import oauth2client
import base64
import pickle
@@ -28,6 +26,9 @@ from django.db import models
from oauth2client.client import Storage as BaseStorage
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class CredentialsField(models.Field):
__metaclass__ = models.SubfieldBase

View File

@@ -18,8 +18,6 @@ Utilities for making it easier to work with OAuth 2.0
credentials.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import os
import threading
@@ -27,6 +25,9 @@ from oauth2client.client import Credentials
from oauth2client.client import Storage as BaseStorage
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class CredentialsFileSymbolicLinkError(Exception):
"""Credentials files must not be symbolic links."""

View File

@@ -161,8 +161,6 @@ available outside of a request context, you will need to implement your own
:class:`oauth2client.Storage`.
"""
__author__ = 'jonwayne@google.com (Jon Wayne Parrott)'
import hashlib
import json
import os
@@ -189,6 +187,9 @@ from oauth2client.client import Storage
from oauth2client import clientsecrets
from oauth2client import util
__author__ = 'jonwayne@google.com (Jon Wayne Parrott)'
DEFAULT_SCOPES = ('email', )

View File

@@ -17,8 +17,6 @@
Utilities for making it easier to use OAuth 2.0 on Google Compute Engine.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import json
import logging
from six.moves import urllib
@@ -28,6 +26,9 @@ from oauth2client import util
from oauth2client.client import AccessTokenRefreshError
from oauth2client.client import AssertionCredentials
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
logger = logging.getLogger(__name__)
# URI Template for the endpoint that returns access_tokens.

View File

@@ -17,8 +17,6 @@
A Storage for Credentials that uses the keyring module.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import threading
import keyring
@@ -27,6 +25,9 @@ from oauth2client.client import Credentials
from oauth2client.client import Storage as BaseStorage
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
class Storage(BaseStorage):
"""Store and retrieve a single credential to and from the keyring.

View File

@@ -32,8 +32,6 @@ Usage::
from __future__ import print_function
__author__ = 'cache@google.com (David T McWherter)'
import errno
import logging
import os
@@ -41,6 +39,9 @@ import time
from oauth2client import util
__author__ = 'cache@google.com (David T McWherter)'
logger = logging.getLogger(__name__)

View File

@@ -44,8 +44,6 @@ The format of the stored data is like so::
"""
__author__ = 'jbeda@google.com (Joe Beda)'
import errno
import json
import logging
@@ -57,6 +55,9 @@ from oauth2client.client import Storage as BaseStorage
from oauth2client import util
from oauth2client.locked_file import LockedFile
__author__ = 'jbeda@google.com (Joe Beda)'
logger = logging.getLogger(__name__)
# A dict from 'filename'->_MultiStore instances

View File

@@ -30,6 +30,7 @@ from oauth2client import util
from oauth2client.tools import ClientRedirectHandler
from oauth2client.tools import ClientRedirectServer
FLAGS = gflags.FLAGS
gflags.DEFINE_boolean('auth_local_webserver', True,

View File

@@ -21,9 +21,6 @@ the same directory.
from __future__ import print_function
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
__all__ = ['argparser', 'run_flow', 'run', 'message_if_missing']
import logging
import socket
import sys
@@ -35,6 +32,10 @@ from six.moves import input
from oauth2client import client
from oauth2client import util
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
__all__ = ['argparser', 'run_flow', 'run', 'message_if_missing']
_CLIENT_SECRETS_MESSAGE = """WARNING: Please configure OAuth 2.0
To make this sample run you will need to populate the client_secrets.json file

View File

@@ -17,6 +17,16 @@
"""Common utility library."""
import functools
import inspect
import logging
import sys
import types
import six
from six.moves import urllib
__author__ = [
'rafek@google.com (Rafe Kaplan)',
'guido@google.com (Guido van Rossum)',
@@ -29,15 +39,6 @@ __all__ = [
'POSITIONAL_IGNORE',
]
import functools
import inspect
import logging
import sys
import types
import six
from six.moves import urllib
logger = logging.getLogger(__name__)
POSITIONAL_WARNING = 'WARNING'

View File

@@ -15,11 +15,6 @@
"""Helper methods for creating & verifying XSRF tokens."""
__authors__ = [
'"Doug Coker" <dcoker@google.com>',
'"Joe Gregorio" <jcgregorio@google.com>',
]
import base64
import hmac
import time
@@ -27,6 +22,11 @@ import time
import six
from oauth2client import util
__authors__ = [
'"Doug Coker" <dcoker@google.com>',
'"Joe Gregorio" <jcgregorio@google.com>',
]
# Delimiter character
DELIMITER = b':'