Remove ansi escape codes from text. Parameters ---------- source : str Source to remove the ansi from
(source)
| 473 | return text |
| 474 | |
| 475 | def strip_ansi(source): |
| 476 | """ |
| 477 | Remove ansi escape codes from text. |
| 478 | |
| 479 | Parameters |
| 480 | ---------- |
| 481 | source : str |
| 482 | Source to remove the ansi from |
| 483 | """ |
| 484 | return re.sub(r'\033\[(\d|;)+?m', '', source) |
| 485 | |
| 486 | |
| 487 | class EvalFormatter(Formatter): |
nothing calls this directly
no outgoing calls
no test coverage detected