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)
| 826 | line[indent:indent+3], line)) |
| 827 | |
| 828 | def _check_prefix(self, lines, prefix, name, lineno): |
| 829 | """ |
| 830 | Check that every line in the given list starts with the given |
| 831 | prefix; if any line does not, then raise a ValueError. |
| 832 | """ |
| 833 | for i, line in enumerate(lines): |
| 834 | if line and not line.startswith(prefix): |
| 835 | raise ValueError('line %r of the docstring for %s has ' |
| 836 | 'inconsistent leading whitespace: %r' % |
| 837 | (lineno+i+1, name, line)) |
| 838 | |
| 839 | |
| 840 | ###################################################################### |
no test coverage detected