MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / decode_escapes

Function decode_escapes

src/dotenv/parser.py:98–102  ·  view source on GitHub ↗
(regex: Pattern[str], string: str)

Source from the content-addressed store, hash-verified

96
97
98def 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
105def parse_key(reader: Reader) -> Optional[str]:

Callers 1

parse_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected