From c81e97c3c281492ac6fdf4abc841ac5b63f3f303 Mon Sep 17 00:00:00 2001 From: Jean Abou-Samra Date: Mon, 31 Jan 2022 22:00:40 +0100 Subject: Remove now redundant re.UNICODE and (?u) (#2058) --- pygments/lexers/python.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pygments/lexers/python.py') diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py index a83bc92a..3b647fc8 100644 --- a/pygments/lexers/python.py +++ b/pygments/lexers/python.py @@ -61,8 +61,6 @@ class PythonLexer(RegexLexer): mimetypes = ['text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3'] - flags = re.MULTILINE | re.UNICODE - uni_name = "[%s][%s]*" % (uni.xid_start, uni.xid_continue) def innerstring_rules(ttype): @@ -214,7 +212,7 @@ class PythonLexer(RegexLexer): (r'(^[ \t]*)' # at beginning of line + possible indentation r'(match|case)\b' # a possible keyword r'(?![ \t]*(?:' # not followed by... - r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't + r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't r'|'.join(keyword.kwlist) + r')\b))', # pattern matching bygroups(Text, Keyword), 'soft-keywords-inner'), ], -- cgit v1.2.1