MCPcopy Index your code
hub / github.com/RustPython/RustPython / _check_prompt_blank

Method _check_prompt_blank

Lib/doctest.py:814–826  ·  view source on GitHub ↗

Given the lines of a source string (including prompts and leading indentation), check to make sure that every prompt is followed by a space character. If any line is not followed by a space character, then raise ValueError.

(self, lines, indent, name, lineno)

Source from the content-addressed store, hash-verified

812 return 0
813
814 def _check_prompt_blank(self, lines, indent, name, lineno):
815 """
816 Given the lines of a source string (including prompts and
817 leading indentation), check to make sure that every prompt is
818 followed by a space character. If any line is not followed by
819 a space character, then raise ValueError.
820 """
821 for i, line in enumerate(lines):
822 if len(line) >= indent+4 and line[indent+3] != ' ':
823 raise ValueError('line %r of the docstring for %s '
824 'lacks blank after %s: %r' %
825 (lineno+i+1, name,
826 line[indent:indent+3], line))
827
828 def _check_prefix(self, lines, prefix, name, lineno):
829 """

Callers 1

_parse_exampleMethod · 0.95

Calls 2

enumerateFunction · 0.85
lenFunction · 0.85

Tested by

no test coverage detected