<commit_before>from robber import expect
from robber.matchers.base import Base


class Called(Base):
    """
    expect(function).to.be.called()
    """

    def matches(self):
        try:
            return self.actual.called
        except AttributeError:
            raise TypeError('{function} is not a mock'.format(function=self.actual))

    def failure_message(self):
        return 'Expected {function} to be called'.format(function=self.actual)


expect.register('called', Called)
expect.register('__called__', Called)<commit_msg>[f] Use `actual` in string format<commit_after>from robber import expect
from robber.matchers.base import Base


class Called(Base):
    """
    expect(function).to.be.called()
    """

    def matches(self):
        try:
            return self.actual.called
        except AttributeError:
            raise TypeError('{actual} is not a mock'.format(actual=self.actual))

    def failure_message(self):
        return 'Expected {actual} to be called'.format(actual=self.actual)


expect.register('called', Called)
expect.register('__called__', Called)
{'fraction_non_alphanumeric': 0.11904761904761904, 'fraction_numerical': 0.0, 'mean_word_length': 3.3031496062992125, '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': '6782943', 'n_tokens_mistral': 316, 'n_tokens_neox': 295, 'n_words': 76}