| 720 | |
| 721 | |
| 722 | class _ReFlags: |
| 723 | def __init__(self, value): |
| 724 | self.value = value |
| 725 | |
| 726 | def _repr_pretty_(self, p, cycle): |
| 727 | done_one = False |
| 728 | for flag in ( |
| 729 | "IGNORECASE", |
| 730 | "LOCALE", |
| 731 | "MULTILINE", |
| 732 | "DOTALL", |
| 733 | "UNICODE", |
| 734 | "VERBOSE", |
| 735 | "DEBUG", |
| 736 | ): |
| 737 | if self.value & getattr(re, flag): |
| 738 | if done_one: |
| 739 | p.text('|') |
| 740 | p.text('re.' + flag) |
| 741 | done_one = True |
| 742 | |
| 743 | |
| 744 | def _re_pattern_pprint(obj, p, cycle): |
no outgoing calls
no test coverage detected
searching dependent graphs…