MCPcopy Index your code
hub / github.com/theskumar/python-dotenv / parse_value

Function parse_value

src/dotenv/parser.py:128–139  ·  view source on GitHub ↗
(reader: Reader)

Source from the content-addressed store, hash-verified

126
127
128def parse_value(reader: Reader) -> str:
129 char = reader.peek(1)
130 if char == "'":
131 (value,) = reader.read_regex(_single_quoted_value)
132 return decode_escapes(_single_quote_escapes, value)
133 elif char == '"':
134 (value,) = reader.read_regex(_double_quoted_value)
135 return decode_escapes(_double_quote_escapes, value)
136 elif char in ("", "\n", "\r"):
137 return ""
138 else:
139 return parse_unquoted_value(reader)
140
141
142def parse_binding(reader: Reader) -> Binding:

Callers 1

parse_bindingFunction · 0.85

Calls 4

decode_escapesFunction · 0.85
parse_unquoted_valueFunction · 0.85
peekMethod · 0.80
read_regexMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…