def METHOD_NAME(self, context: bool = True) -> list[str]:
    """Format the diff and return a list of lines, optionally including context."""
    if context:
        lines = self.lines_and_context
    else:
        lines = self.lines
    return ['%s:%4d %s' % (self.path, line[0], line[1]) for line in lines]