<commit_before>from __future__ import absolute_import, division, print_function

import json


class StripeResponse:

    def __init__(self, body, code, headers):
        self.body = body
        self.code = code
        self.headers = headers
        self.data = json.loads(body)

    @property
    def idempotency_key(self):
        try:
            return self.headers['idempotency-key']
        except KeyError:
            return None

    @property
    def request_id(self):
        try:
            return self.headers['request-id']
        except KeyError:
            return None<commit_msg>Make StripeResponse a new-style class<commit_after>from __future__ import absolute_import, division, print_function

import json


class StripeResponse(object):
    def __init__(self, body, code, headers):
        self.body = body
        self.code = code
        self.headers = headers
        self.data = json.loads(body)

    @property
    def idempotency_key(self):
        try:
            return self.headers['idempotency-key']
        except KeyError:
            return None

    @property
    def request_id(self):
        try:
            return self.headers['request-id']
        except KeyError:
            return None
{'fraction_non_alphanumeric': 0.07879772542648253, 'fraction_numerical': 0.0, 'mean_word_length': 2.1508951406649617, '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': '5254815', 'n_tokens_mistral': 345, 'n_tokens_neox': 334, 'n_words': 89}