<commit_before>import sys

class PasswordSetError(Exception):
    """Raised when the password can't be set.
    """

class PasswordDeleteError(Exception):
    """Raised when the password can't be deleted.
    """

class InitError(Exception):
    """Raised when the keyring could not be initialised
    """

class ExceptionRaisedContext(object):
    """
    An exception-trapping context that indicates whether an exception was
    raised.
    """
    def __init__(self, ExpectedException=Exception):
        self.ExpectedException = ExpectedException
        self.exc_info = None

    def __enter__(self):
        self.exc_info = object.__new__(ExceptionInfo)
        return self.exc_info

    def __exit__(self, *exc_info):
        self.exc_info.__init__(*exc_info)
        return issubclass(self.exc_info.type, self.ExpectedException)

class ExceptionInfo(object):<commit_msg>Fixed behavior when no exception was raised in ExceptionRaisedContext<commit_after>import sys

class PasswordSetError(Exception):
    """Raised when the password can't be set.
    """

class PasswordDeleteError(Exception):
    """Raised when the password can't be deleted.
    """

class InitError(Exception):
    """Raised when the keyring could not be initialised
    """

class ExceptionRaisedContext(object):
    """
    An exception-trapping context that indicates whether an exception was
    raised.
    """
    def __init__(self, ExpectedException=Exception):
        self.ExpectedException = ExpectedException
        self.exc_info = None

    def __enter__(self):
        self.exc_info = object.__new__(ExceptionInfo)
        return self.exc_info

    def __exit__(self, *exc_info):
        self.exc_info.__init__(*exc_info)
        return self.exc_info.type and issubclass(
            self.exc_info.type, self.ExpectedException)

class ExceptionInfo(object):
{'fraction_non_alphanumeric': 0.08982683982683982, 'fraction_numerical': 0.0, 'mean_word_length': 3.5097560975609756, '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': '4846991', 'n_tokens_mistral': 521, 'n_tokens_neox': 499, 'n_words': 138}