(doc)
| 10 | |
| 11 | |
| 12 | def get_entry_slice(doc): |
| 13 | current_version = sys.stdin.readline().strip() |
| 14 | start_line = None |
| 15 | end_line = None |
| 16 | for section in doc.children[0].children: |
| 17 | if start_line: |
| 18 | end_line = section.children[0].line - 2 |
| 19 | break |
| 20 | header = section.children[0] |
| 21 | if current_version in getattr(header, "rawsource", ""): |
| 22 | start_line = header.line - 2 |
| 23 | return slice(start_line, end_line) |
| 24 | |
| 25 | |
| 26 | def parse_rst(text: str) -> docutils.nodes.document: |
no outgoing calls
no test coverage detected
searching dependent graphs…