Reads documented classes from a doc file using a regex to find lines like [[autodoc]] my.module.Class. Returns a list of documented class names (just the class name portion).
(doc_path, autodoc_regex=r"\[\[autodoc\]\]\s([^\n]+)")
| 26 | |
| 27 | |
| 28 | def read_documented_classes(doc_path, autodoc_regex=r"\[\[autodoc\]\]\s([^\n]+)"): |
| 29 | """ |
| 30 | Reads documented classes from a doc file using a regex to find lines like [[autodoc]] my.module.Class. |
| 31 | Returns a list of documented class names (just the class name portion). |
| 32 | """ |
| 33 | with open(os.path.join(REPO_PATH, doc_path), "r") as f: |
| 34 | doctext = f.read() |
| 35 | matches = re.findall(autodoc_regex, doctext) |
| 36 | return [match.split(".")[-1] for match in matches] |
| 37 | |
| 38 | |
| 39 | def read_source_classes(src_path, class_regex, exclude_conditions=None): |
no test coverage detected
searching dependent graphs…