# Path: bin/deps/pydocstyle/utils.py
# def is_blank(string):
#     """Return True iff the string contains only whitespaces."""
#     return not string.strip()


from itertools import dropwhile
from functools import partial
from collections import namedtuple
from .utils import is_blank
    @property
    def message(self):
        """Return the message to print to the user."""
        ret = '{}: {}'.format(self.code, self.short_desc)
        if self.context is not None:
            specific_error_msg = self.context.format(*self.parameters)
            ret += ' ({})'.format(specific_error_msg)
        return ret

    @property
    def lines(self):
        """Return the source code lines for this error."""
        source = ''
        lines = self.definition.source
        offset = self.definition.start
        lines_stripped = list(reversed(list(dropwhile(is_blank,
                                                      reversed(lines)))))
        numbers_width = len(str(offset + len(lines_stripped)))
        line_format = '{{:{}}}:{{}}'.format(numbers_width)
        for n, line in enumerate(lines_stripped):
            if line:
                line = ' ' + line
            source += line_format.format(n + offset, line)
            if n > 5:
                source += '        ...\n'
                break
        return source

    def __str__(self):
        self.explanation = '\n'.join(l for l in self.explanation.split('\n')

# Path: bin/deps/pydocstyle/utils.py
# def is_blank(string):
#     """Return True iff the string contains only whitespaces."""
#     return not string.strip()


# Path: bin/deps/pydocstyle/violations.py
from itertools import dropwhile
from functools import partial
from collections import namedtuple
from .utils import is_blank

    @property
    def message(self):
        """Return the message to print to the user."""
        ret = '{}: {}'.format(self.code, self.short_desc)
        if self.context is not None:
            specific_error_msg = self.context.format(*self.parameters)
            ret += ' ({})'.format(specific_error_msg)
        return ret

    @property
    def lines(self):
        """Return the source code lines for this error."""
        source = ''
        lines = self.definition.source
        offset = self.definition.start
        lines_stripped = list(reversed(list(dropwhile(is_blank,
                                                      reversed(lines)))))
        numbers_width = len(str(offset + len(lines_stripped)))
        line_format = '{{:{}}}:{{}}'.format(numbers_width)
        for n, line in enumerate(lines_stripped):
            if line:
                line = ' ' + line
            source += line_format.format(n + offset, line)
            if n > 5:
                source += '        ...\n'
                break
        return source

    def __str__(self):
        self.explanation = '\n'.join(l for l in self.explanation.split('\n')

                                     if not is_blank(l))