<commit_before>from allauth.account.models import EmailAddress
from allauth.socialaccount import providers
from allauth.socialaccount.providers.github.provider import (GitHubProvider,
                                                             GitHubAccount)


class KumaGitHubAccount(GitHubAccount):
    """
    A custom account object to have some extra helpers.
    """
    def get_email_addresses(self):
        return self.account.extra_data.get('email_addresses')


class KumaGitHubProvider(GitHubProvider):
    """
    A custom Github provider that addtionally is able to handle the
    list of email addresses fetched from the GitHub API and use it
    to populate the list of verified email addresses with it.

    It'll use the "user:email" OAuth2 scope to be able to fetch the
    private email addresses from users.
    """
    package = 'kuma.users.providers.github'
    account_class = KumaGitHubAccount

    def extract_email_addresses(self, data):
        email_addresses = []
        print data
        for email_address in data.get('email_addresses', []):
            # let's ignore all email address that have not been verified at<commit_msg>Fixed typo.<commit_after>from allauth.account.models import EmailAddress
from allauth.socialaccount import providers
from allauth.socialaccount.providers.github.provider import (GitHubProvider,
                                                             GitHubAccount)


class KumaGitHubAccount(GitHubAccount):
    """
    A custom account object to have some extra helpers.
    """
    def get_email_addresses(self):
        return self.account.extra_data.get('email_addresses')


class KumaGitHubProvider(GitHubProvider):
    """
    A custom Github provider that additionally is able to handle the
    list of email addresses fetched from the GitHub API and use it
    to populate the list of verified email addresses with it.

    It'll use the "user:email" OAuth2 scope to be able to fetch the
    private email addresses from users.
    """
    package = 'kuma.users.providers.github'
    account_class = KumaGitHubAccount

    def extract_email_addresses(self, data):
        email_addresses = []
        print data
        for email_address in data.get('email_addresses', []):
            # let's ignore all email address that have not been verified at
{'fraction_non_alphanumeric': 0.06328024106758502, 'fraction_numerical': 0.0008609556607834697, 'mean_word_length': 2.8797996661101837, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2124825', 'n_tokens_mistral': 612, 'n_tokens_neox': 580, 'n_words': 210}