MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _sanitize_restructured_text

Function _sanitize_restructured_text

lib/sqlalchemy/util/deprecations.py:300–308  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

298
299
300def _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
311def _decorate_cls_with_warning(

Callers 2

deprecated_paramsFunction · 0.85
_decorate_with_warningFunction · 0.85

Calls 1

subMethod · 0.80

Tested by

no test coverage detected