<commit_before>"""Authenticate the user in Open-Spending."""

from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()

from requests_oauthlib import OAuth2Session
from gobble.config import GOOGLE_OAUTH, REDIRECT_URL, SCOPE, GOOGLE_API_URL


if __name__ == '__main__':
    oauth = OAuth2Session(
        GOOGLE_OAUTH['client_id'],
        redirect_uri=REDIRECT_URL,
        scope=SCOPE
    )
    # access_type and approval_prompt are Google specific extra parameters.
    authorization_url, state = oauth.authorization_url(
        GOOGLE_API_URL,
        access_type='offline',
        approval_prompt='force',
    )

    print ('Please go to %s and authorize access.' % authorization_url)
    authorization_response = input('Enter the full callback URL')
<commit_msg>Ensure PEP8 compliance in user module.<commit_after>"""Authenticate the user in Open-Spending."""

from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import

from future import standard_library
standard_library.install_aliases()

from requests_oauthlib import OAuth2Session
from gobble.config import GOOGLE_OAUTH, REDIRECT_URL, SCOPE, GOOGLE_API_URL


if __name__ == '__main__':
    oauth = OAuth2Session(
        GOOGLE_OAUTH['client_id'],
        redirect_uri=REDIRECT_URL,
        scope=SCOPE
    )
    # access_type and approval_prompt are Google specific extra parameters.
    authorization_url, state = oauth.authorization_url(
        GOOGLE_API_URL,
        access_type='offline',
        approval_prompt='force',
    )

    print('Please go to %s and authorize access.' % authorization_url)
{'fraction_non_alphanumeric': 0.06586169045005488, 'fraction_numerical': 0.0027442371020856204, 'mean_word_length': 4.441791044776119, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5236236', 'n_tokens_mistral': 550, 'n_tokens_neox': 522, 'n_words': 146}