MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_atext

Function get_atext

Lib/email/_header_value_parser.py:1206–1220  ·  view source on GitHub ↗

atext = We allow any non-ATOM_ENDS in atext, but add an InvalidATextDefect to the token's defects list if we find non-atext characters.

(value)

Source from the content-addressed store, hash-verified

1204 return ptext, value
1205
1206def get_atext(value):
1207 """atext = <matches _atext_matcher>
1208
1209 We allow any non-ATOM_ENDS in atext, but add an InvalidATextDefect to
1210 the token&#x27;s defects list if we find non-atext characters.
1211 """
1212 m = _non_atom_end_matcher(value)
1213 if not m:
1214 raise errors.HeaderParseError(
1215 "expected atext but found '{}'".format(value))
1216 atext = m.group()
1217 value = value[len(atext):]
1218 atext = ValueTerminal(atext, 'atext')
1219 _validate_xtext(atext)
1220 return atext, value
1221
1222def get_bare_quoted_string(value):
1223 """bare-quoted-string = DQUOTE *([FWS] qcontent) [FWS] DQUOTE

Callers 2

get_atomFunction · 0.85
get_dot_atom_textFunction · 0.85

Calls 5

lenFunction · 0.85
ValueTerminalClass · 0.85
_validate_xtextFunction · 0.85
formatMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected