<commit_before>"""
github3.models
==============

This module provides the basic models used in github3.py

"""

from json import dumps
from requests import session
from re import compile
from github3.decorators import requires_auth
from github3.packages.PySO8601 import parse

try:  # (No coverage)
    # Python 2.x
    from urlparse import urlparse  # (No coverage)
except ImportError:  # (No coverage)
    # Python 3.x
    from urllib.parse import urlparse  # NOQA

__url_cache__ = {}


class GitHubObject(object):
    """The :class:`GitHubObject <GitHubObject>` object. A basic class to be
    subclassed by GitHubCore and other classes that would otherwise subclass
    object."""
    def __init__(self, json):
        super(GitHubObject, self).__init__()
        self._json_data = json

    def to_json(self):
        """Return the json representing this object."""
        return self._json_data

    def _strptime(self, time_str):
        """Converts an ISO 8601 formatted string into a datetime object."""
        return parse(time_str) if time_str else None

    @classmethod<commit_msg>Simplify thanks to requests.compat.<commit_after>"""
github3.models
==============

This module provides the basic models used in github3.py

"""

from json import dumps
from requests import session
from requests.compat import urlparse
from re import compile
from github3.decorators import requires_auth
from github3.packages.PySO8601 import parse

__url_cache__ = {}


class GitHubObject(object):
    """The :class:`GitHubObject <GitHubObject>` object. A basic class to be
    subclassed by GitHubCore and other classes that would otherwise subclass
    object."""
    def __init__(self, json):
        super(GitHubObject, self).__init__()
        self._json_data = json

    def to_json(self):
        """Return the json representing this object."""
        return self._json_data

    def _strptime(self, time_str):
        """Converts an ISO 8601 formatted string into a datetime object."""
        return parse(time_str) if time_str else None

    @classmethod
{'fraction_non_alphanumeric': 0.0921435499515034, 'fraction_numerical': 0.012609117361784675, 'mean_word_length': 3.615212527964206, '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': '1021371', 'n_tokens_mistral': 609, 'n_tokens_neox': 561, 'n_words': 210}