<commit_before># flake8: noqa

"""
gspread
~~~~~~~

Google Spreadsheets client library.

"""


__version__ = "5.4.0"
__author__ = "<NAME>"


from .auth import oauth, oauth_from_dict, service_account, service_account_from_dict
from .cell import Cell
from .client import BackoffClient, Client, ClientFactory
from .exceptions import (
    CellNotFound,
    GSpreadException,
    IncorrectCellLabel,
    NoValidUrlKeyFound,
    SpreadsheetNotFound,
    WorksheetNotFound,
)
from .spreadsheet import Spreadsheet
from .worksheet import Worksheet


def authorize(credentials, client_factory=Client):
    """Login to Google API using OAuth2 credentials.
    This is a shortcut function which
    instantiates using `client_factory`.
    By default :class:`gspread.Client` is used (but could also use
    :class:`gspread.BackoffClient` to avoid rate limiting).

    :returns: `client_class` instance.
    """

    client = client_factory(auth=credentials)
    return client<commit_msg>Typo fix<commit_after># flake8: noqa

"""
gspread
~~~~~~~

Google Spreadsheets client library.

"""


__version__ = "5.4.0"
__author__ = "<NAME>"


from .auth import oauth, oauth_from_dict, service_account, service_account_from_dict
from .cell import Cell
from .client import BackoffClient, Client, ClientFactory
from .exceptions import (
    CellNotFound,
    GSpreadException,
    IncorrectCellLabel,
    NoValidUrlKeyFound,
    SpreadsheetNotFound,
    WorksheetNotFound,
)
from .spreadsheet import Spreadsheet
from .worksheet import Worksheet


def authorize(credentials, client_factory=Client):
    """Login to Google API using OAuth2 credentials.
    This is a shortcut function which
    instantiates using `client_factory`.
    By default :class:`gspread.Client` is used (but could also use
    :class:`gspread.BackoffClient` to avoid rate limiting).

    :returns: `client_factory` instance.
    """

    client = client_factory(auth=credentials)
    return client
{'fraction_non_alphanumeric': 0.08722421754746024, 'fraction_numerical': 0.00513083632632119, 'mean_word_length': 4.386740331491713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7015356', 'n_tokens_mistral': 595, 'n_tokens_neox': 564, 'n_words': 172}