Transform error messages from the C tokenizer into the Python tokenize The C tokenizer is more picky than the Python one, so we need to massage the error messages a bit for backwards compatibility.
(msg)
| 569 | raise |
| 570 | |
| 571 | def _transform_msg(msg): |
| 572 | """Transform error messages from the C tokenizer into the Python tokenize |
| 573 | |
| 574 | The C tokenizer is more picky than the Python one, so we need to massage |
| 575 | the error messages a bit for backwards compatibility. |
| 576 | """ |
| 577 | if "unterminated triple-quoted string literal" in msg: |
| 578 | return "EOF in multi-line string" |
| 579 | return msg |
| 580 | |
| 581 | def _generate_tokens_from_c_tokenizer(source, encoding=None, extra_tokens=False): |
| 582 | """Tokenize a source reading Python code as unicode strings using the internal C tokenizer""" |
no outgoing calls
no test coverage detected
searching dependent graphs…