(start, end, config_lines, indent, errors, is_list=False)
return idx
Here we suppose the config block is correctly formatted (@param, description, empty comment then the actual content)
    and try to return the line of any data coming after. In case of a object we point to its first member. In case
    of a list or a simple variable we point to the next element.
Here we suppose the config block is correctly formatted (
Here we suppose the config block is correctly formatted (
def _get_end_of_param_declaration_block(start, end, config_lines, indent, errors, is_list=False):
    """Here we suppose the config block is correctly formatted (@param, description, empty comment then the actual content)
    and try to return the line of any data coming after. In case of a object we point to its first member. In case
    of a list or a simple variable we point to the next element.
    """

    if not is_exactly_indented(config_lines[start], indent):
        other_indent = get_indent(config_lines[start])
        errors.append(ValidatorError(f"Unexpected indentation, expecting {indent} not {other_indent}", start))
        return None

    if not config_lines[start].startswith(' ' * indent + "## @param"):
        errors.append(ValidatorError("Expecting @param declaration", start))
        return None

    # Going through the description
    idx = start + 1
    while idx < end:
        if is_blank(config_lines[idx]):
            errors.append(ValidatorError("Blank line when reading description", idx))
            return None
        if not is_exactly_indented(config_lines[idx], indent):
            other_indent = get_indent(config_lines[idx])
            err_string = f"Unexpected indentation, expecting {indent} not {other_indent}"
            errors.append(ValidatorError(err_string, idx))
            return None

        current_line = config_lines[idx][indent:]
        if current_line[0:2] == '##':
            # This is still the description
            idx += 1
        elif current_line[0] == '#':
            # This is the last line of the description
            idx += 1
            break
        else:
            errors.append(ValidatorError(f"Cannot find end of block starting at line {start}", idx))
            return None

    # Now analyze the actual content
    idx += 1
    while idx < end:
        if is_blank(config_lines[idx]):
            idx += 1
            continue
        if not is_at_least_indented(config_lines[idx], indent):
            # We reached a surrounding block, thus this block has ended.
            break

        current_line = config_lines[idx][indent:]

        if current_line[0:2] == '# ':
            # Commented data
            idx += 1
        elif current_line.lstrip(' ').startswith('- '):
            # The object is a list of things, let's get to the end of that object
            is_list = True
            idx += 1
        elif is_list and is_at_least_indented(config_lines[idx], indent + 1):
            idx += 1
        else:
            break

    return idx
def _get_end_of_param_declaration_block ( start , end , config_lines , indent , errors , is_list = False ) : if not is_exactly_indented ( config_lines [ start ] , indent ) : other_indent = get_indent ( config_lines [ start ] ) errors . append ( ValidatorError ( f"Unexpected indentation, expecting {indent} not {other_indent}" , start ) ) return None if not config_lines [ start ] . startswith ( ' ' * indent + "## @param" ) : errors . append ( ValidatorError ( "Expecting @param declaration" , start ) ) return None # Going through the description idx = start + 1 while idx < end : if is_blank ( config_lines [ idx ] ) : errors . append ( ValidatorError ( "Blank line when reading description" , idx ) ) return None if not is_exactly_indented ( config_lines [ idx ] , indent ) : other_indent = get_indent ( config_lines [ idx ] ) err_string = f"Unexpected indentation, expecting {indent} not {other_indent}" errors . append ( ValidatorError ( err_string , idx ) ) return None current_line = config_lines [ idx ] [ indent : ] if current_line [ 0 : 2 ] == '##' : # This is still the description idx += 1 elif current_line [ 0 ] == '#' : # This is the last line of the description idx += 1 break else : errors . append ( ValidatorError ( f"Cannot find end of block starting at line {start}" , idx ) ) return None # Now analyze the actual content idx += 1 while idx < end : if is_blank ( config_lines [ idx ] ) : idx += 1 continue if not is_at_least_indented ( config_lines [ idx ] , indent ) : # We reached a surrounding block, thus this block has ended. break current_line = config_lines [ idx ] [ indent : ] if current_line [ 0 : 2 ] == '# ' : # Commented data idx += 1 elif current_line . lstrip ( ' ' ) . startswith ( '- ' ) : # The object is a list of things, let's get to the end of that object is_list = True idx += 1 elif is_list and is_at_least_indented ( config_lines [ idx ] , indent + 1 ) : idx += 1 else : break return idx