Check that every line in the given list starts with the given prefix; if any line does not, then raise a ValueError.
(self, lines, prefix, name, lineno)
| 820 | line[indent:indent+3], line)) |
| 821 | |
| 822 | def _check_prefix(self, lines, prefix, name, lineno): |
| 823 | """ |
| 824 | Check that every line in the given list starts with the given |
| 825 | prefix; if any line does not, then raise a ValueError. |
| 826 | """ |
| 827 | for i, line in enumerate(lines): |
| 828 | if line and not line.startswith(prefix): |
| 829 | raise ValueError('line %r of the docstring for %s has ' |
| 830 | 'inconsistent leading whitespace: %r' % |
| 831 | (lineno+i+1, name, line)) |
| 832 | |
| 833 | |
| 834 | ###################################################################### |
no test coverage detected