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

Class AngleAddr

Lib/email/_header_value_parser.py:422–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420
421
422class AngleAddr(TokenList):
423
424 token_type = 'angle-addr'
425
426 @property
427 def local_part(self):
428 for x in self:
429 if x.token_type == 'addr-spec':
430 return x.local_part
431
432 @property
433 def domain(self):
434 for x in self:
435 if x.token_type == 'addr-spec':
436 return x.domain
437
438 @property
439 def route(self):
440 for x in self:
441 if x.token_type == 'obs-route':
442 return x.domains
443
444 @property
445 def addr_spec(self):
446 for x in self:
447 if x.token_type == 'addr-spec':
448 if x.local_part:
449 return x.addr_spec
450 else:
451 return quote_string(x.local_part) + x.addr_spec
452 else:
453 return '<>'
454
455
456class ObsRoute(TokenList):

Callers 1

get_angle_addrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected