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