| 8 | |
| 9 | |
| 10 | def _split_docstring(value): |
| 11 | headers = {} |
| 12 | current_header = "" |
| 13 | current_lines = [] |
| 14 | lines = value.split("\n") |
| 15 | index = 0 |
| 16 | while index < len(lines): |
| 17 | if index + 1 < len(lines) and len(lines[index + 1].strip(" ")) > 0 and \ |
| 18 | len(lines[index + 1].strip(" ").strip("-")) == 0: |
| 19 | headers[current_header] = current_lines |
| 20 | current_header = lines[index].strip(" ") |
| 21 | current_lines = [] |
| 22 | index = index + 1 |
| 23 | else: |
| 24 | current_lines.append(lines[index]) |
| 25 | index = index + 1 |
| 26 | headers[current_header] = current_lines |
| 27 | return headers |
| 28 | |
| 29 | def _update_description(schema, lines): |
| 30 | if len("".join(lines).strip(" ")) > 0: |