(self)
| 589 | |
| 590 | @property |
| 591 | def value(self): |
| 592 | quote = False |
| 593 | if self.defects: |
| 594 | quote = True |
| 595 | else: |
| 596 | for x in self: |
| 597 | if x.token_type == 'quoted-string': |
| 598 | quote = True |
| 599 | if len(self) != 0 and quote: |
| 600 | pre = post = '' |
| 601 | if (self[0].token_type == 'cfws' or |
| 602 | isinstance(self[0], TokenList) and |
| 603 | self[0][0].token_type == 'cfws'): |
| 604 | pre = ' ' |
| 605 | if (self[-1].token_type == 'cfws' or |
| 606 | isinstance(self[-1], TokenList) and |
| 607 | self[-1][-1].token_type == 'cfws'): |
| 608 | post = ' ' |
| 609 | return pre+quote_string(self.display_name)+post |
| 610 | else: |
| 611 | return super().value |
| 612 | |
| 613 | |
| 614 | class LocalPart(TokenList): |
nothing calls this directly
no test coverage detected