(text: str)
| 298 | |
| 299 | |
| 300 | def _sanitize_restructured_text(text: str) -> str: |
| 301 | def repl(m: Match[str]) -> str: |
| 302 | type_, name = m.group(1, 2) |
| 303 | if type_ in ("func", "meth"): |
| 304 | name += "()" |
| 305 | return name |
| 306 | |
| 307 | text = re.sub(r":ref:`(.+) <.*>`", lambda m: '"%s"' % m.group(1), text) |
| 308 | return re.sub(r"\:(\w+)\:`~?(?:_\w+)?\.?(.+?)`", repl, text) |
| 309 | |
| 310 | |
| 311 | def _decorate_cls_with_warning( |
no test coverage detected