Skip to content

Commit de562f8

Browse files
authored
Fix re pattern pretty print (ipython#14559)
Alternative to ipython#14558
2 parents d7d58a3 + 03eee4f commit de562f8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

IPython/lib/pretty.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,15 @@ def __init__(self, value):
724724

725725
def _repr_pretty_(self, p, cycle):
726726
done_one = False
727-
for flag in ('TEMPLATE', 'IGNORECASE', 'LOCALE', 'MULTILINE', 'DOTALL',
728-
'UNICODE', 'VERBOSE', 'DEBUG'):
727+
for flag in (
728+
"IGNORECASE",
729+
"LOCALE",
730+
"MULTILINE",
731+
"DOTALL",
732+
"UNICODE",
733+
"VERBOSE",
734+
"DEBUG",
735+
):
729736
if self.value & getattr(re, flag):
730737
if done_one:
731738
p.text('|')

0 commit comments

Comments
 (0)