| 323 | |
| 324 | |
| 325 | class Address(TokenList): |
| 326 | |
| 327 | token_type = 'address' |
| 328 | |
| 329 | @property |
| 330 | def display_name(self): |
| 331 | if self[0].token_type == 'group': |
| 332 | return self[0].display_name |
| 333 | |
| 334 | @property |
| 335 | def mailboxes(self): |
| 336 | if self[0].token_type == 'mailbox': |
| 337 | return [self[0]] |
| 338 | elif self[0].token_type == 'invalid-mailbox': |
| 339 | return [] |
| 340 | return self[0].mailboxes |
| 341 | |
| 342 | @property |
| 343 | def all_mailboxes(self): |
| 344 | if self[0].token_type == 'mailbox': |
| 345 | return [self[0]] |
| 346 | elif self[0].token_type == 'invalid-mailbox': |
| 347 | return [self[0]] |
| 348 | return self[0].all_mailboxes |
| 349 | |
| 350 | class MailboxList(TokenList): |
| 351 |
no outgoing calls
no test coverage detected
searching dependent graphs…