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)
| 799 | line[indent:indent+3], line)) |
| 800 | |
| 801 | def _check_prefix(self, lines, prefix, name, lineno): |
| 802 | """ |
| 803 | Check that every line in the given list starts with the given |
| 804 | prefix; if any line does not, then raise a ValueError. |
| 805 | """ |
| 806 | for i, line in enumerate(lines): |
| 807 | if line and not line.startswith(prefix): |
| 808 | raise ValueError('line %r of the docstring for %s has ' |
| 809 | 'inconsistent leading whitespace: %r' % |
| 810 | (lineno+i+1, name, line)) |
| 811 | |
| 812 | |
| 813 | ###################################################################### |
no test coverage detected