MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / cleanup_text

Function cleanup_text

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

Source from the content-addressed store, hash-verified

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

Callers 1

_parse_columnMethod · 0.85

Calls 2

subMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected