MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / cleanup_text

Function cleanup_text

lib/sqlalchemy/dialects/mysql/reflection.py:700–707  ·  view source on GitHub ↗
(raw_text: str)

Source from the content-addressed store, hash-verified

698
699
700def cleanup_text(raw_text: str) -> str:
701 if "\\" in raw_text:
702 raw_text = re.sub(
703 _control_char_regexp,
704 lambda s: _control_char_map[s[0]], # type: ignore[unused-ignore,index] # noqa: E501
705 raw_text,
706 )
707 return raw_text.replace("''", "'")
708
709
710_control_char_map = {

Callers 1

_parse_columnMethod · 0.85

Calls 2

subMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected