(val: str | bytes, config: Config | None)
| 1559 | |
| 1560 | |
| 1561 | def _ascii_escaped_by_config(val: str | bytes, config: Config | None) -> str: |
| 1562 | if config is None: |
| 1563 | escape_option = False |
| 1564 | else: |
| 1565 | escape_option = config.getini( |
| 1566 | "disable_test_id_escaping_and_forfeit_all_rights_to_community_support" |
| 1567 | ) |
| 1568 | # TODO: If escaping is turned off and the user passes bytes, |
| 1569 | # will return a bytes. For now we ignore this but the |
| 1570 | # code *probably* doesn't handle this case. |
| 1571 | return val if escape_option else ascii_escaped(val) # type: ignore |
| 1572 | |
| 1573 | |
| 1574 | class Function(PyobjMixin, nodes.Item): |
no test coverage detected