From b3f17f48c20bcd02de4f5eaac039827d6465b0e4 Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Thu, 1 Aug 2024 00:40:34 +0530 Subject: [PATCH] de-duplicate the two regexes --- src/blib2to3/pgen2/tokenize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blib2to3/pgen2/tokenize.py b/src/blib2to3/pgen2/tokenize.py index d4b6bc1ddfe..ae26617a4bd 100644 --- a/src/blib2to3/pgen2/tokenize.py +++ b/src/blib2to3/pgen2/tokenize.py @@ -136,8 +136,8 @@ def _combinations(*l: str) -> Set[str]: ) # beginning of a single quoted f-string. must not end with `{{` or `\N{` -SingleLbrace = r"(?:\\N{|\\[^{]|{{|[^'\\{])*(? Set[str]: _string_middle_double = r'(?:[^\n"\\]|\\.)*' # FSTRING_MIDDLE and LBRACE, must not end with a `{{` or `\N{` -_fstring_middle_single = r"(?:\\N{|\\[^{]|{{|[^\n'{\\])*(?