<commit_before>from six import iteritems

from bravado_core.content_type import APP_JSON
from bravado_core.unmarshal import unmarshal_schema_object
from bravado_core.validate import validate_schema_object
from bravado_core.exception import MatchingResponseNotFound, SwaggerMappingError 

# Response bodies considered to be empty
EMPTY_BODIES = (None, '', '{}', 'null')


class IncomingResponse(object):
    """
    Interface for incoming client-side response objects.

    Subclasses are responsible for providing attrs for __required_attrs__.
    """
    __required_attrs__ = [
        'reason',       # string - http reason phrase
        'status_code',  # int - http status code
        'text',         # string - raw text of the body
    ]

    def __getattr__(self, name):
        """
        When an attempt to access a required attribute that doesn't exist
        is made, let the caller know that the type is non-compliant in its
        attempt to be `IncomingResponse`. This is in place of the usual throwing
        of an AttributeError.
<commit_msg>Bad github for not chomping trailing spaces<commit_after>from six import iteritems

from bravado_core.content_type import APP_JSON
from bravado_core.unmarshal import unmarshal_schema_object
from bravado_core.validate import validate_schema_object
from bravado_core.exception import MatchingResponseNotFound, SwaggerMappingError

# Response bodies considered to be empty
EMPTY_BODIES = (None, '', '{}', 'null')


class IncomingResponse(object):
    """
    Interface for incoming client-side response objects.

    Subclasses are responsible for providing attrs for __required_attrs__.
    """
    __required_attrs__ = [
        'reason',       # string - http reason phrase
        'status_code',  # int - http status code
        'text',         # string - raw text of the body
    ]

    def __getattr__(self, name):
        """
        When an attempt to access a required attribute that doesn't exist
        is made, let the caller know that the type is non-compliant in its
        attempt to be `IncomingResponse`. This is in place of the usual throwing
        of an AttributeError.

{'fraction_non_alphanumeric': 0.062238736646539713, 'fraction_numerical': 0.0, 'mean_word_length': 3.2738095238095237, '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': '5595995', 'n_tokens_mistral': 573, 'n_tokens_neox': 550, 'n_words': 218}