| 427 | |
| 428 | |
| 429 | class AngleAddr(TokenList): |
| 430 | |
| 431 | token_type = 'angle-addr' |
| 432 | |
| 433 | @property |
| 434 | def local_part(self): |
| 435 | for x in self: |
| 436 | if x.token_type == 'addr-spec': |
| 437 | return x.local_part |
| 438 | |
| 439 | @property |
| 440 | def domain(self): |
| 441 | for x in self: |
| 442 | if x.token_type == 'addr-spec': |
| 443 | return x.domain |
| 444 | |
| 445 | @property |
| 446 | def route(self): |
| 447 | for x in self: |
| 448 | if x.token_type == 'obs-route': |
| 449 | return x.domains |
| 450 | |
| 451 | @property |
| 452 | def addr_spec(self): |
| 453 | for x in self: |
| 454 | if x.token_type == 'addr-spec': |
| 455 | if x.local_part: |
| 456 | return x.addr_spec |
| 457 | else: |
| 458 | return quote_string(x.local_part) + x.addr_spec |
| 459 | else: |
| 460 | return '<>' |
| 461 | |
| 462 | |
| 463 | class ObsRoute(TokenList): |
no outgoing calls
no test coverage detected
searching dependent graphs…