(regex: Pattern[str], string: str)
| 96 | |
| 97 | |
| 98 | def decode_escapes(regex: Pattern[str], string: str) -> str: |
| 99 | def decode_match(match: Match[str]) -> str: |
| 100 | return codecs.decode(match.group(0), 'unicode-escape') # type: ignore |
| 101 | |
| 102 | return regex.sub(decode_match, string) |
| 103 | |
| 104 | |
| 105 | def parse_key(reader: Reader) -> Optional[str]: |